Thanks for the reply. But a part of it is still unclear to me. I know this is very basic but still..... In case of BMT (and BMP). Suppose I start some (my own) transaction from the SessionBean. Who make sure that I get some connection object second time? Is it container or DataSource? If it is container, then why? because it is not supposed to be involved? If it is DataSource how is it notified of the transaction information?
Vivek ----- Original Message ----- From: "Gene Chuang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 09, 2002 10:40 PM Subject: Re: BMP with CMT > Doing Connection.close() under CMT or BMT + BMP does not close the connection, but only > returns it to the pool. Subsequent retrieval of a connection within the same txn will > retrieve the same Connection. Many vendors accomplish this using ThreadLocal. The > Connection is committed only when you (BMT) or the container (CMT) calls txn.commit(). > > Gene > --- Vivek Singh <[EMAIL PROTECTED]> wrote: > > Hi Ashwani > > > > Thanks for the reply. Just another bit. > > When one does connection.close() the connection goes to the pool and when the next time > > connection retrieved from the pool the container makes sure that the application gets > > the same connection if the same transaction is still continuing. Right? If this is the > > case and one goes for BMT then will one acheive this? > > > > Vivek > > ----- Original Message ----- > > From: Ashwani Kalra > > To: [EMAIL PROTECTED] > > Sent: Thursday, May 09, 2002 11:51 AM > > Subject: Re: BMP with CMT > > > > > > hi vivek > > > > Container transaction manager work according to the tx attributes you set for each > > Function. > > if you have one function say > > f1() tx attribute required > > f2() tx attribute required > > > > lets assume f1 calls f2. Now your transation will be considered successfull only > > when f1 completes successfully. Doing a connection.close() does not mean that > > connection is closed . It is actually returned to the pool. And these details are > > handled by the transaction manager of the container which talks to the database. > > > > Does CMT with BMP make sense in a Single Resource manager scenario? > > > > Yes you can. There is no such restriction. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Thanks > > Ashwani Kalra > > http://www.geocities.com/ashwani_kalra/ > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Shopping - Mother's Day is May 12th! > http://shopping.yahoo.com > > =========================================================================== > 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".
