Problems with connection pooling on Sun Appserver 9.0_01 (Glassfish) [JDBC93] #131
Submitted by: Marcel Gascoyne (mgascoyne)
We've problems with the connection pool on our appserver. The class used for the connection pool is org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource.
At unspecific time, all attempts to use a connection from the pool is resulting in the following exception:
Error in allocating a connection. Cause: Connection could not be allocated because: Could not obtain connection during blocking timeout (5000 ms)
The connection limit on the pool is set to 100 connections. But where are only about 5 connections in use. If this exception occurs you must restart the appserver.
The text was updated successfully, but these errors were encountered:
Commented by: Alexander Glazkov (solarapex)
After spending a few hours, it seems I have found the cause.
Normally, the databaseName parameter value has format SERVER/PORT:DRIVE:/PATH/FILE.GDB
The section 6 in the FAQ provides a different format.
Try it. It should work.
Commented by: Jaroslav Beran (berk)
I am unable to find org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource class,
After several experiments I choosed org.firebirdsql.pool.FBSimpleDataSource and it works fine.
My properties for this data source are:
userName - myuser
My platform is:
- Win XP
Commented by: Tray Allen (dycept)
I am also confronted with some Trouble in using the Jaybird driver together with glassfish
This is the setup....
I wrote a session bean doing this:
For that Session bean i wrote a client doning this:
So when i go into the Adminconsole of Glassfish to configure a connection pool and use one of the following:
then I get an Errormessage, that looks like this when I run the Client:
javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
Only if i set the class to be :
I can execute the Client without errormessage.
Plz help me I am very confused.... :-(
Commented by: Carl Smotricz (smotricz)
I had the same problem and was able to fix it thanks to the comments in this issue - thanks!
In my successful configuration, I am using org.firebirdsql.pool.sun.AppServerConnectionPoolDataSource .
I specified Resource Type javax.sql.ConnectionPoolDataSource. Apart from all the defaults, I only specified "password", "userName" and "databaseName" properties. The latter is <//localhost:3050/myalias> , i.e. "new format".
I found that using an alias (specified in %FIREBIRD_HOME%\aliases.conf) helped avoid complications with colons and slashes in database path names.
Commented by: @mrotteveel
Current working theory:
I have yet to reproduce this problem, before I can actually fix this.
Commented by: @mrotteveel
I committed a fix for the incorrect synchronisation and broken stack semantics of BlockingStack. I also added testcases for the issues, and removed unncessary code from BlockingStack.
As far as I can see this should fix the described issue, unfortunately I have only been able to reproduce this with a synthetic testcase. I will do some more investigation into a realistic reproduction case, and see if other synchronisation issues reported by FindBugs for Connection and ConnectionPool related classes could contribute to this problem as well.