You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Vernon Smith <vw...@lycos.com> on 2003/12/08 18:05:30 UTC

[DBCP] Can DBCP be used to solve this XA issue?

Hi,

Here is a situation: 
During a user registration, data is inserted into a sequence of tables. Those insertion queries are submitted at different time during the registration. To maintain the data integrity, the data shall be either all written or none of them written. Other than this scenario, the rest of queries in the application work fine with the auto-commit setting. The current version of BD connection pool in place is unable to handle this issue without JTA. I have browsed over the DBCP API. It seems to me the DBCP might be able to the job. I have done a thorough search in the Jakarta site and using Google, unable to find more detailed document/examples on the subject. Can someone give me a help?

Thanks,

Vernon


____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [DBCP] Can DBCP be used to solve this XA issue?

Posted by Dirk Verbeeck <di...@pandora.be>.
The usual way to handle this kind of situation is to keep all the user 
registration data in memory and insert the data into the database at 
the end of the registration process.

Using a XAConnection with user transaction coordination or a simple 
Connection with autocommit false, in both cases you are holding on to 
database resources for a longer period of time.
You depend on the application user or timeout to release the resource 
and that is something to avoid.

-- Dirk


Vernon Smith wrote:
> Hi,
> 
> Here is a situation: 
> During a user registration, data is inserted into a sequence of tables. Those insertion queries are submitted at different time during the registration. To maintain the data integrity, the data shall be either all written or none of them written. Other than this scenario, the rest of queries in the application work fine with the auto-commit setting. The current version of BD connection pool in place is unable to handle this issue without JTA. I have browsed over the DBCP API. It seems to me the DBCP might be able to the job. I have done a thorough search in the Jakarta site and using Google, unable to find more detailed document/examples on the subject. Can someone give me a help?
> 
> Thanks,
> 
> Vernon



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org