• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mandatory

 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
if we call a method(in bean A) with mandatory attribute, from another bean (bean B) Which bean will get TransactionRequiredException/local?
Bean B or bean A?
Amol
 
Keerthi P
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 'caller' will get the exception.
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

From the specs (18.4.2.2)

The javax.transaction.TransactionRequiredException is a
subclass of the java.rmi.RemoteException. It is defined
in the JTA standard extension.
The javax.ejb.TransactionRequiredLocalException is a
subclass of the javax.ejb.EJBException.

The javax.transaction.TransactionRequiredException or
javax.ejb.TransactionRequiredLocalException informs the
client that the target enterprise bean must be invoked
in a client´┐Żs transaction, and that the client invoked
the enterprise bean without a transaction context.

This error usually indicates that the application was not
properly formed.


Cheers,

Gian
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic