[JCA/JBoss] - Re: JBoss Connection Pooling Problem With Unisys DMS-II JDBC
by PeterJ
Are you sure the app is releasing the connection when it is done with it? Have you tracked the connection usage using the jboss.jca:service=ManagedConnectionPool,name=DmsiiMyDB-DS MBean? If the app does not release the connections, then yes when it attempt to get a fourth connection it will be blocked.
Once all three connections have been established, those connections will remain active until they time out after being unused. And setting the timeout to 1 minute is not a good idea - usually 10-15 minutes is better.
We have run the specjappserver benchmark against the DMSII JDBC driver and have not had issues with it releasing connections.
I am going to assume that you have purchased support for JBoss from Unisys (I know you must have such support for DMSII). It might be better it you opened a trouble report with Unisys, then the guys who work on the JDBC driver can help you (it's been many years since I worked on that...)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223818#4223818
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223818
15 years, 9 months
[JCA/JBoss] - Re: ResourceException messages improve
by PeterJ
I would gladly open a JIRA and attach a patch, but once again I find that I have just read-only access to JIRA - I cannot create new issues, nor comment on existing issues. So Adrian, could you open a JIRA? The patch follows (should be good for 5.0.x and 5.1.x):
Index: BaseConnectionManager2.java
| ===================================================================
| --- BaseConnectionManager2.java (revision 86861)
| +++ BaseConnectionManager2.java (working copy)
| @@ -438,7 +438,7 @@
| }
|
| // If we get here all retries failed, throw the lastest failure
| - throw failure;
| + throw new ResourceException("Unable to get managed connection for datasource " + jndiName, failure);
| }
|
| public void returnManagedConnection(ConnectionListener cl, boolean kill)
I could not get the the code in InternalManagedConnectionPool to add in the JNDI name because it did not know it. Based on Eclipse, and on the compiler, the only way to get to InternalManagedConnectionPool.getConnection() is from BaseConnectionManager2.getManagedConnection() (via ConnectionListener.getConnection()). Of those three, only BaseConnectionManager2 knew the JNDI name. The choice was either passing the JNDI name along (by changing the method signatures) or adding the name in at BaseConnectionManager2. Then I noticed that BaseConnectionManager2.getManagedConnection rethrows the exceptions it catches and that make it easy to layer on another exception which did name the data source.
Here is an example of the exception:
2009-04-06 14:03:29,169 DEBUG [org.hibernate.util.JDBCExceptionReporter] (http-127.0.0.1-8080-3) Cannot open connection [???]
| org.jboss.util.NestedSQLException: Unable to get managed connection for datasource jdbc/jsfDS; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for datasource jdbc/jsfDS)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
| at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:46)
| ***lots of lines deleted***
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: javax.resource.ResourceException: Unable to get managed connection for datasource jdbc/jsfDS
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441)
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
| ... 91 more
| Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 10000 [ms] )
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:295)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:644)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
| ... 95 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223811#4223811
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223811
15 years, 9 months