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