Hello,

is a rollback performed when a connection is returned to the pool (no matter if returned through con.close() or after exceeding the removeAbandondedTimeout)?

I'm afraid of the following scenario:

servlet 1: getConnection() -> returns con 1
servlet 1, con 1: setAutoCommit(false)
servlet 1, con 1: performs insert 1
servlet 1, con 1: con.close() -> returned to connection pool
servlet 2: getConnection() -> returns con 1 from connection pool
servlet 2, con 1: performs insert 2
servlet 2, con 1: commit()

And here comes the question: Before servlet 1 closes con 1 no commit or rollback is performed. When servlet 2 get's the same connection later, is it working with insert 1, which isn't rolled back yet although the connection was closed without a commit(), which means it is committing and insert it hasn't created itself?

Regards
Marten


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to