posted 14 years ago
I have a scenario. I am using the websphere for obtaining the connection from pool.
The connection pool is of non transactional it has min = 10 max= 20 . The problem I am facing is in the code the connection is getting closed but for some reason IBM holds on to the closed connection and not reusing it in the pool. I can see through tivolli monitor that it almost opened 150 connection and closed all 150 and there are 2-4 in the pool.
But when I talk to the DBA he is saying that all the 150 opened connections are inactive but hold on by the Websphere.
I am sending the codes here, any help will be appreciated. I am using Hibernate.
Connection factory class
DBUtil class which is used by the codes to open and close the transaction.
Hibernate config settings.
A typical implementation.
query = getDbutil().startNewTransaction("GET_MATERIAL_ID_FOR_MATERIAL_CODE");
query.setString(0, material);
list = getDbutil1().executeQueryCommit(query);