No. If you are relying on container managed transactions, then making SS1B Stateful will have no effect on your transaction management.
You could make SS1B stateful and then manage the Transaction yourself. Ie Start a Transaction at begin of SS1BMethod1 and complete the Trasaction at end of SS1BMethod2. But I would recommend against this, I think you should reconsider your design. William > -----Original Message----- > From: Ramki [mailto:[EMAIL PROTECTED]] > Sent: Friday, 12 July 2002 6:18 > To: [EMAIL PROTECTED] > Subject: Re: user transaction > > > Hi Saurabh, > > Thanks a lot for the clarification. > > Anyway,,one more clarification is required: > > Servlet -->SS1BMethod1--->SS2BMethod1-->control back to Servlet > > Servlet -->SS1BMethod2--->SS2BMethod2-->control back to Servlet > > In our case no User Transaction is started in the Servlet.It > is started > by the Container before calling method1 of SS1, If we make > SS1 stateful > , I hope our problem is solved right?? > > Is this conclusion right? > > Ramki. > > -------------------------------------------------------------- > ---------- > --- > This is exactly what is meant when stating that in case of stateless > session beans 'transactions cannot span methods'. When SS1BMethod1 is > called by the servlet there are 2 cases possible - > > 1. The servlet starts the UserTransaction. In this case the tx is > propogated to SS1B and SS2B and after SS2BMethod1 finishes the servlet > still has got a cuurent tx. It can then either call SS1BMethod2 and > SSB2Method2 under the same tx or complete this current tx and start a > new one. > > 2. The servlet call SSB1Method1 without any tx in which case the > container starts a tx before calling SS1BMethod1. The same tx is > propagated to SSB2Method1. When this invocation is complete and the > container is back in control after SSB1Method1 finishes, it > will finish > the tx it had started before calling SSB1Method. This is what is > happening in your case. > > -Saurabh > > ============================================================== > ========== > === > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body of the message "signoff EJB-INTEREST". For general help, send > email to [EMAIL PROTECTED] and include in the body of the message > "help". > > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
