Your client code should be able to use JNDI to lookup the JTA
UserTransaction interface. Once you get that you can do a .begin() to start
your transaction and .commit() to end it.
--
Tinou Bao
www.tinou.com
----- Original Message -----
From: "Ankur Jain" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 10:48 AM
Subject: Re: [EJB-INT] EJB Transaction Problem
> Hi Tinou ,
>
> Yes you are right a third party will open a transaction and that will
> be propogated to the session bean. The third party will not be a EJB so I
> am not sure how the transaction context will be passed to the EJB. If you
> could help a little bit in this than it will be greatful.
>
> Thanks in advance.
> Ankur
>
>
>
> Tinou Bao
> <tinoubao@HOTMAIL To:
[EMAIL PROTECTED]
> .COM> cc:
> Sent by: A Subject: Re: EJB
Transaction Problem
> mailing list for
> Enterprise
> JavaBeans
> development
> <EJB-INTEREST@JAV
> A.SUN.COM>
>
>
> 06/15/01 07:41 PM
> Please respond to
> Tinou Bao
>
>
>
>
>
> Hi,
>
> First thing, you mentioned two databases...you'll need two phase commit.
> Second, I don't think you need to make your session bean stateless.
> Third, what are your transaction boundaries...when you say the third party
> opens a transaction do you mean you explicitly start a new transaction and
> that transaction is propagated to the session bean?
>
> --
> Tinou Bao
> www.tinou.com
>
> ----- Original Message -----
> From: "Ankur Jain" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 15, 2001 9:03 AM
> Subject: [EJB-INT] EJB Transaction Problem
>
>
> > Hi All,
> >
> > In our project we are using stateless session Beans, we have a
> > requirement that a third party would be calling our EJB (deployed in our
> > iPlanet app server)to do certain transactions. The sequence of the
events
> > are as follows
> >
> > The third Party opens a Transaction at their end
> > They do a database transaction (in their Database )at their end
> > They make a call to our EJB method
> > Again they make a call to another EJB method in our system
> > They do another Database transaction (in their database) at their end
> > If the above operations are successful then the transaction should be
> > committed on both the database
> > Otherwise it has to Rollback in both the databases.
> >
> > Since rollback mechanism is not supported by the Stateless Bean at the
> > transaction level we have changed the EJB to Stateful Bean.
> > The EJB 1.1 specs states that the TRANSACTION context can be passed
from
> > the caller and can be further propagated to all EJB's within the same
> > transaction and this is possible in the case of Container Managed
> > Transactions by simply setting an attribute in the Deployment
Descriptor.
> > But we are using our connection pooling hence how do we manage the
> > transaction that has to span across multiple EJB's
> >
> > eg.
> > ejb1.open() connection.setAutoCommit(false)
> > ejb2.open() connection.setAutoCommit(false)
> > ejb1.methodA();
> > ejb2.methodB();
> > ejb1.commit();
> > ejb2.commit(); ====> what if it fails here during a commit ? we
> need
> > to rollback both but how?
> >
> > Any suggestion or help in this regard will be highly helpful
> >
> > Thanks in advance.
> > Ankur S Jain
> >
> >
>
===========================================================================
> > 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".
>
>
===========================================================================
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".