I
suppose this question goes to who ever implemented ejb transactions on
Jboss2.4.6
How
does jboss associate transactions with an ejb? Lets say for example I have
the following scenario:
If I
have 1 stateless session bean running under container managed transactions with
3 methods (A, B, C) and their transaction attributes are set
to:
A -
NotSupported
B -
Required
C - Required
and a
client (with no transaction running) that calls method A, which in turns calls B
and then B calls C.
so the
flow is
1.
client calls A
2. A calls B
3. B
calls C
4. C
is done returns control to B
5. B
is done returns control to A
6. A
is done, returns results to client
Now if
an exception occurs in C , I set the rollback method on the ejbcontext and
propagate the error to B. B then sets the rollback method on the same
context and returns to A. A throws the exception to the client... from
what I have observed, any work done in method B is committed and not rolled
back.
The
EJB spec is very clear when it comes to one ejb calling another ejb but not so
clear when it comes to the multiple methods within the same EJB. It looks
like the transaction context is associated with the bean instance so if the
first method called is NotSupported, any methods called on the SAME bean by the
first method also run under NotSupported, even if they are declared
differently....
Can
anyone confirm?
Thanks,
Dat
***************************************************************
Confidentiality note: This e-mail contains information from the
GFI Group Inc. and/or its affiliates, including GFInet inc.,
that is confidential and/or legally privileged. This
information is intended only for the use of the individual or
entity named on this e-mail. This e-mail and its content may
not be reproduced or retransmitted without the express written
permission of The GFI Group.
***************************************************************