Re: [BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-21 Thread taktos
> Is it possible that you have autoCommit set to true? No, it is impossible as you know. Sample code I wrote is just a sample. Actually I use a DI container (Seasar, it is a popular DI container in Japan), and Seasar provides DBCP implementation. > This makes me concerned that fixing the bug

Re: [BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-20 Thread takiguchi
Hi, Kevin. Thank you for your reply. This is a problem of connection pooling, not of transaction. public void testConnection() { Connection con = dataSource.getConnection(); // get a connection from pool (If DB server restarted, invalid connection will be returned) boolean valid = true;

Re: [BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-20 Thread Kevin Grittner
takiguchi wrote: > public void testConnection() { >Connection con = dataSource.getConnection(); // get a connection > from pool (If DB server restarted, invalid connection will be > returned) >boolean valid = true; >try { >// execute some DMLs... >con.commit(); >}

Re: [BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-20 Thread Kevin Grittner
takiguchi wrote: > This is a problem of connection pooling, not of transaction. > > public void testConnection() { >Connection con = dataSource.getConnection(); // get a connection > from pool (If DB server restarted, invalid connection will be > returned) >boolean valid = true; >tr

Re: [BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-20 Thread Kevin Grittner
wrote: > If PostgreSQL server is restarted, old Connection pooled in > Application server's ConnectionPool cannot connect to DB. > That's OK. > But, I can call rollback() on old Connection and it throws no > exception. Hmmm What problem are you having? The transaction would have been r

[BUGS] BUG #5127: AbstractJdbc2Connection#doRollback should throws Exception if connection is closed

2009-10-20 Thread
The following bug has been logged online: Bug reference: 5127 Logged by: Email address: tak...@gmail.com PostgreSQL version: 8.3.7 Operating system: CentOS 5.1 Description:AbstractJdbc2Connection#doRollback should throws Exception if connection is closed Details: I