• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 2.x Client view for EJB 3 bean

 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

I have an EJB 3 Stateless session bean instance and I have a client that is written to EJB 2.x Stateless session bean. Now as per the promise of EJB 3, this same client written for EJB 2.x should also be suitable for EJB 3 Stateless bean. So in such a case, how would I handle my RemoteException in my client (originally built for accessing EJB 2.x) which is targetting a EJB 3 Stateless bean because in my EJB 3 Remote Interface I do not have to explicitly say that I throw RemoteException?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34870
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jothi,
I was under the impression that the container will add the remoteexception as needed (through byte code manipulation.) Are you saying it doesn't do that?
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The container certainly does the byte code enhancement, but that is during deployment. How can I handle RemoteException in my client when the methods in the interface that is marked @remote does not throws RemoteException. I mean how to add a catch block to handle RemoteException when my @Remote interface methods does not throw them during compilation time?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic