Subject 'Cannot provide new connection' error in EJB3 EAR app on Glassfish 2.1 (Sun)
Author meinhardt.baer

I am trying to develop EAR application (EJB3, web modulues) on Glassfish 2.1, NB6.5.1 and FB 1.5.x and Java Server Faces (actually ICEFaces, the best option, I guess). I managed to create EJB's from database, to compile applciation and to deploy on the server, but when I am trying to view the page that has query 'SELECT o from CUSTOMER', where customer is my EJB - mapped to customers tables, I am getting:
'Caused by: java.lang.IllegalStateException: Cannot provide new connection while old one is still in use.
at org.firebirdsql.pool.AbstractPingablePooledConnection.getConnection(
at com.sun.gjc.spi.ManagedConnection.getActualConnection(
at com.sun.gjc.spi.ManagedConnection.getConnection(
at com.sun.enterprise.resource.LocalTxConnectorAllocator.fillInResourceObjects('

I can see this in the Jaybird code - here it is:
' /**
* Get JDBC connection corresponding to this pooled connection instance.
* @return instance of {@link Connection}
* @throws SQLException if some error happened.
Connection getConnection() throws SQLException {



if (currentConnection != null) {

throw new IllegalStateException(
"Cannot provide new connection while old one is still in use.");


currentConnection = new PooledConnectionHandler(jdbcConnection, this);

Connection result = currentConnection.getProxy();


return result;

Well - I cannot find now, but I have sense that I have read somewhere, that there can be support only for single connection in Jaybird or something like this, so - can I achieve my goal to use Firebird in J2EE EJB3.0 app with Jaybird?