As long as you are calling B and C through the remote interface (or local interface) and not directly on the bean class, your expectations are correct. If you call the bean methods directly, everything is executed as "A" NotSupported with no tx. Your work may then be autocommitted (unlikely) or just left sitting around and accidentally committed later (likely).
You also need to verify that you have datasources set up correctly etc etc. I think if you turn up logging high enough you will see what the tx manager is doing, which is the best guide to ... what the tx manager is doing. If your db results differ, you don't have your datasource set up correctly. david jencks On 2002.09.10 18:23:18 -0400 Dat Nguyen wrote: > 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. > *************************************************************** > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> > > > <META content="MSHTML 6.00.2712.300" name=GENERATOR></HEAD> > <BODY> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>I > suppose this question goes to who ever implemented ejb transactions on > Jboss2.4.6</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT> </DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>How > does jboss associate transactions with an ejb? Lets say for example > I have > the following scenario:</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT> </DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>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:</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT> </DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>A - > NotSupported</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>B - > Required</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT><FONT face=Arial color=#0000ff > size=2><SPAN class=453345921-10092002>C - Required</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT> </DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>and a > client (with no transaction running) that calls method A, which in turns > calls B > and then B calls C.</SPAN></FONT></DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002></SPAN></FONT> </DIV> > <DIV><FONT face=Arial color=#0000ff size=2><SPAN > class=453345921-10092002>so the > flow is </SPAN></FONT></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>1. > client calls A</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>2. A calls B</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>3. B > calls C</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>4. C > is done returns control to B</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>5. B > is done returns control to A</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>6. A > is done, returns results to client</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>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. </FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>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....</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>Can > anyone confirm?</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>Thanks,</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2>Dat</FONT></SPAN></DIV> > <DIV><SPAN class=453345921-10092002><FONT face=Arial color=#0000ff > size=2></FONT></SPAN> </DIV><CODE><FONT SIZE=3><BR> > <BR> > ***************************************************************<BR> > Confidentiality note: This e-mail contains information from the <BR> > GFI Group Inc. and/or its affiliates, including GFInet inc., <BR> > that is confidential and/or legally privileged. This <BR> > information is intended only for the use of the individual or <BR> > entity named on this e-mail. This e-mail and its content may <BR> > not be reproduced or retransmitted without the express written <BR> > permission of The GFI Group.<BR> > ***************************************************************<BR> > </FONT></CODE> > </BODY></HTML> > ------------------------------------------------------- In remembrance www.osdn.com/911/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user