This week's book giveaway is in the Android forum.
We're giving away four copies of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java and have Shai Almog on-line!
See this thread for details.
Win a copy of Create an Uber Clone in 7 Days: Build a real world full stack mobile app in Java this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.x Client view for EJB 3 bean  RSS feed

 
Ranch Hand
Posts: 10128
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?
 
author & internet detective
Marshal
Posts: 38394
650
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: 10128
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?
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!