Ramki,

> Yes,,,you are right William. I was surprised to see that Stateless
> Session Beans Transactions cannot span multiple methods,. In our
> application we have very much done that, but we have other problems.

'spanning multiple method calls' reffred to transaction started by the SLSB
or the container to service the SLSB method - not for pre-existing
transactions

> In the Second case :
> Here there are two SeesionBeans SS1 and SS2
>
> Servlet -->SS1BMethod1--->SS2BMethod1-->control back to Servlet
> Servlet -->SS1BMethod2--->SS2BMethod2-->control back to Servlet
>
> In this case if all the methods in both the beans have TX_REQUIRED,will
> the Transaction which was started by SS1BMethod1 be carried over to
> SS2BMethod2??
> Here the problem I see is that when a new Method is called on a
> Servlet,a new Thread will be started.

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".

Reply via email to