SessionBeanA - method1
******************************
1. Get a database connection
2. Insert a few rows
3. Close connection

SessionBeanB - method2
******************************
1. Get a database connection
2. Insert a few rows
3. Close connection

SessionBeanC - method-3
******************************
call sessionBeanA.method1()
call sessionBeanB.method2()

question
***********
If all three beans are marked as TX_REQUIRED, How does the EJB server
commits or rollback? For a regular JDBC connection( I think) , a close()
method will not allow any more rollbacks or commits.  How does EJB Server
know to give the SessionBeanB-method2() the same connection that was given
to sessionBeanA?

Does EJB Server need the use of a special JDBC driver to accomplish this?
What if we want to use our own JDBC driver?

Some of the books have advocated the following method to obtain the
connection:

Datasource ds = (Datasource)jndiContext.lookup("java:comp/env/jdbc/myDB");
java.sql.Connection con = ds.getConnection();

I don'e see how the Datasource could have been aware of the ongoing
transaction. What could I be missing?

Thanks for your help
Satya.

===========================================================================
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