Session bean methods invoked by the client in this transaction can now be delegated to the
bean instance. An error occurs if a client attempts to invoke a method on the session object and
the deployment descriptor for the method requires that the container invoke the method in a
different transaction context than the one with which the instance is currently associated or in
an unspecified transaction context.
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
Let's say a method's transaction attribute is RequiresNew. I would think that a new transaction would be created and the method would run in that transaction.
An error occurs if a client attempts to invoke a method on the session object and
the deployment descriptor for the method requires that the container invoke the method in a
different transaction context than the one with which the instance is currently associated or in
an unspecified transaction context.
Cheers,<br />Reghu Ram T<br /> <br />SCJP 1.4 - 98 %, SCBCD 1.3 - 94 %, SCMAD 1.0 - 92 %
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
If a session bean instance is participating in a transaction, it is an error for a client to invoke a
method on the session object such that the transaction attribute in the deployment descriptor
would cause the container to execute the method in a *different transaction context* or in an
unspecified transaction context. In such a case, the container throws the java.rmi.RemoteException
to the client if the client is a remote client, or the javax.ejb.EJBException
if the client is a local client.
Weerawit<br />SCJP 1.4, SCWCD 1.2, SCWCD 1.4, SCBCD 1.3, SCBCD 5.0, SCMAD 1.0, SCJA 1.0, SCDJWS, SCJD, SCEA, SCDJWS 1.5
Nauman Khan <br />SCJP,MCSE,SCWCD,SCBCD,SCWCD1.4
Weerawit<br />SCJP 1.4, SCWCD 1.2, SCWCD 1.4, SCBCD 1.3, SCBCD 5.0, SCMAD 1.0, SCJA 1.0, SCDJWS, SCJD, SCEA, SCDJWS 1.5
Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
Originally posted by Kathy Sierra:
The container is allowed to suspend the CLIENT's incoming transaction in order to start a new one. But the container is NOT allowed to suspend the BEAN's currently-open transaction in order to start a new one for a different method of the bean. That's just not allowed because, as was said earlier, that would be a 'nested' transaction which is not permitted (and if it were, it would open up a whole new can of worms to deal with -- a whole new set of rules for what happens if one of the participants in the nest hierarchy does not commit...)
Kathy
DKR<br />SCJP1.2,SCWCD1.4,SCBCD1.3,SCJA
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |