• Post Reply Bookmark Topic Watch Topic
  • New Topic

Transactions :confused:

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJBException is thrown for local clients when the bean method throws a system exception.

Is my second statement true?
RemoteException is thrown for remote clients when the bean method throws a system exception.
 
Ralph Jaus
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is my second statement true?
RemoteException is thrown for remote clients when the bean method throws a system exception.
No, usually an EJBException is thrown to the client (regardless it's remote or local) by the container (exception: a web service client receives a java.rmi.RemoteException).

It's a good idea to study the tables in core spec 14.3 for the various cases that can encounter.
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Ralph, look at page-364 of core specifications-

Throw RemoteException
to remote or web service
client; throw EJBException
to local client.
 
Ralph Jaus
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "usually" I meant EJB 3 beans, of course, not EJB 2.1 beans.

To be serious, I'm glad to see that the reference for the tables helped.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!