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.

What we concluded is that Transaction can be maintained across method
calls in a SSB if the Client is still using the same thread.(Transaction
is associated with the Thread) For ex, if the Client is a Pure java
class

Then
PJ--->SSBMethod1--->control back to PJ(pure java class)

PJ--->SSBMethod2--->control back to PJ.

If method1 and method2 of SSB form a Trnasaction, then the Transaction
can be committed at the end of method2 by the Container.if method 1 has
TX_Requires and method2 also has TX_REQUIRES.

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.
Please get back to me if further clarity is required.

Ramki.

-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]] On Behalf Of William Ferguson
Sent: Friday, July 12, 2002 11:37
To: [EMAIL PROTECTED]
Subject: 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.


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

**************************Disclaimer************************************

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying
or dissemination of the information contained in the E-MAIL in any manner
whatsoever is strictly prohibited.

***************************************************************************

Reply via email to