No offense - I was just attempting to clarify. In the instance you cite, ie a Transaction started within a bean method, or at start of a bean method, whether it be bean or container managed, you are correct - the Transaction cannot span more than a single method of a StatelessSessionBean. However if the Transaction is started before entry to an SSB, then it may span multiple methods of the bean.
So a client of an SSB may start a Transaction via UserTransaction and that Transaction may certainly span multiple SSB methods. I just thought this point need clarification for the original poster. William > -----Original Message----- > From: Saurabh Sahai [mailto:[EMAIL PROTECTED]] > Sent: Friday, 12 July 2002 4:18 > To: William Ferguson; [EMAIL PROTECTED] > Subject: Re: Re: user transaction > > > > Transactions can most definitely span more than one method for both > > bean/container managed transactions. > > And I believe the UserTansaction can be resolved via a JNDI > lookup from > all > > types of beans. > > > > You seem to be confusing Transaction with state. > > A StatelessSessionBean cannot hold state between client method > invocations. > > For that you need a StatefulSessionBean. > > No - I am not confusing transaction with state - if a > tranasction has been > started by a stateless bean or by the container on behalf of > the bean (for > e.g. TX_REQUIRESNEW), that transaction MUST be completed at > the end of the > method. The original post was whether stateless beans could use > UserTransaction or not and the answer to that was that they > could so long as > the transaction was started and completed at the end of the method. > > Please refer to sec 17.3.3 page 341 and 17.6.1 for clarification. > > Am I missing something?? > > -Saurabh > > > > > > > William > > > > > -----Original Message----- > > > From: Saurabh Sahai [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, 12 July 2002 3:50 > > > To: [EMAIL PROTECTED] > > > Subject: Re: user transaction > > > > > > > > > In case of stateless session beans, if a transaction has > been started > > > (either by the bean in case of BMT or by the container in > > > case of CMT), the > > > transaction must be completed (by the bean or the container > > > depending on > > > whether the bean is BMT or CMT) at the end of the method - > > > this is what is > > > meant by 'transactions cannot span method calls' > > > > > > hope this clarifies it a bit > > > > > > -Saurabh > > > > > > ----- Original Message ----- > > > From: "Ramki" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Friday, July 12, 2002 3:44 PM > > > Subject: Re: user transaction > > > > > > > > > > >> Is it true that the UserTransaction can't be get in stateless > > > > sesstion > > > > >> bean and enitity bean. We have to used container managed > > > transaction > > > > >> for that. > > > > >>>> In case of stateless session beans, the only > > > restriction is that > > > > transactions cannot span multiple methods. > > > > > > > > What does Transaction cannot span multiple methods > mean?? Are you > > > > talking with the case of a User Transaction?In other > cases, ie CMT > > > > Transaction can span multiple methods in Stateless Bean ..right? > > > > > > > > Ramki. > > > > > > > > > > > > > > ============================================================== > > > ============= > > > 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". > > > > =========================================================================== 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".
