Issue Details (XML | Word | Printable)

Key: JDBC-144
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Heiko Tappe
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

Timout problem with pooled firebird connection on JBoss

Created: 28/May/09 04:05 PM   Updated: 07/May/17 12:32 PM
Component/s: Connection pool
Affects Version/s: Jaybird 2.1.6
Fix Version/s: Jaybird 3.0.0

Environment: JBoss 5.0.0.GA
Issue Links:
Relate
 


 Description  « Hide
After a while (of inactivity?) the exception below is thrown. After that I usually have to restart the AS to get rid of the problem. Probably the environment tries to close an already closed connection.

If I comment line #285 (checkValidity call) in AbstractPingablePooledConnection.java the problem seems to be solved:

protected void internalClose() throws SQLException {
        /* checkValidity(); */

        if (currentConnection != null)
            currentConnection.deallocate();

        jdbcConnection.close();

        statements.clear();

        invalidate();
    }


Caused by: java.lang.IllegalStateException: Cannot execute desired operation because pooled connection has invalid state.
at org.firebirdsql.pool.AbstractPingablePooledConnection.checkValidity(AbstractPingablePooledConnection.java:176)
at org.firebirdsql.pool.AbstractPingablePooledConnection.internalClose(AbstractPingablePooledConnection.java:285)
at org.firebirdsql.pool.AbstractPingablePooledConnection.deallocate(AbstractPingablePooledConnection.java:302)
at org.firebirdsql.pool.PooledConnectionQueue.destroyConnection(PooledConnectionQueue.java:252)
at org.firebirdsql.pool.AbstractConnectionPool.getPooledConnection(AbstractConnectionPool.java:254)
at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:359)
at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getPooledConnection(AbstractFBConnectionPoolDataSource.java:397)
at org.firebirdsql.pool.AbstractFBConnectionPoolDataSource.getXAConnection(AbstractFBConnectionPoolDataSource.java:431)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:449)


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 22/Jul/11 11:09 AM - edited
I am able to reproduce this error message with a SessionBean and client similar to the one in JDBC-93 on GlassFish 3.1 using Jaybird 2.1.6

Mark Rotteveel added a comment - 27/Aug/11 12:02 PM
Removed Fix version; for Jaybird 2.2 use org.firebirdsql.ds.FBConnectionPoolDataSource instead.

This class is considered for removal in Jaybird version after 2.2

Mark Rotteveel added a comment - 02/Sep/12 11:12 AM
Eliminated deprecated datasources from org.firebirdsql.pool