This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and the fly likes Connection Pool Dirty Connection? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connection Pool Dirty Connection?" Watch "Connection Pool Dirty Connection?" New topic
Author

Connection Pool Dirty Connection?

Dominik Ratajski
Greenhorn

Joined: Feb 09, 2004
Posts: 14
I'm coming across a problem where an exception is raised after server based connection pool connection has the setAutoCommit(false) method run:



03/Jul/2004:10:15:56] SEVERE ( 8864): RAR5040:Cannot get local connection
com.sun.enterprise.resource.PoolingException: I/O Error: Got minus one from a read call.
at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:100)
at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:742)
at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:520)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:263)
at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.getCurrentConnection(JdbcXAConnection.java:637)
at com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection.setAutoCommit(JdbcXAConnection.java:402)
at com.aramco.gps.dao.ConnectionManager.getConnection(ConnectionManager.java:46)

is there anyway a connection can be passed back to the pool in a dirty state? for instance prior to a commit/rollback.

any ideas what a "minus one from read call" means?

also - does the setAutoCommit() method communicate in anyway with the backend database? so for instance, could this error be as a result of a connection that is "valid" to the server connection pool, but say a network error causes the exception when the setAutoCommit() communication occurs.

i can't reproduce this error. it's on Sun ONE AS 7.0 and i'll post this in that forum also.

any ideas appreciated. cheers.
 
jQuery in Action, 2nd edition
 
subject: Connection Pool Dirty Connection?