anand san

Greenhorn
+ Follow
since Dec 19, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by anand san

Hi,

I have a web application , in which we make lot of stored procedure calls.
We use hibernate to make DB connections, and use below to call stored procedure.

Connection connection =  session.connection();   // I know it is old and deprecated, but error is not thrown at this line.
CallableStatement cstmt = connection.prepareCall("{call storedProcedureName(?)}");
cstmt.execute();

It normally works fine, but some times it throws hung thread exception and when i see error stack trace, it leads me to above mentioned prepareCall line.
Last line at error stack trace it:

at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:196)
at com.ibm.ejs.j2c.FreePool.queueRequest(FreePool.java:437)
at com.ibm.ejs.j2c.FreePool.createOrWaitForConnection(FreePool.java:1343)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3874)
at com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3094)
at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1548)
at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1031)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:644)
at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:920)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:66)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.BorrowedConnectionProxy.invoke(BorrowedConnectionProxy.java:50)
at com.sun.proxy.$Proxy39.prepareCall(Unknown Source)

Can anyone help me to identify exact issue here?