Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

throw RemoteException to the client?

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the JSR 318,
1. RemoteException is deprecated since EJB 1.1.
2. web service client of a bean gets RemoteException when a bean throws a system exception.
3. a business method of a session bean and the onMessage method of a MDB do not throw RemoteException.

I am wondering about 2. If RemoteException is not used anymore, why the web service client gets RemoteException ? For backward compatibility? Or, with EJB 3.1, all the beans throw EJBException that wraps any system exception ?

Enthuware mock exam points out that a system exception is wrapped as a RemoteException and being thrown to the remote client.
I am waiting for their reply and ask this question on this forum.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For backward compatibility?

Yes, that is the only reason!
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic