Issue: ====== If a particular connection is taking longer time (hanging for a while, let us say 3sec), I need to identify the situation and terminate this connection to the database proceede with further activities...
Understanding: ============== I knew that there are connection parameter settings in Websphere (like ConnectionTimeout, Max Connections, Min Connections, Reap Time, Unused Timeout and Aged Timeout) which are not useful to determine/satisfy the need.
Current Settings: ================= ConnectionTimeout= 3sec Max Connections= 50 Min Connections= 1 Reap Time= 180 Unused Timeout = 1800 Aged Timeout= 0
Somebody suggested to use Timer & TimeTask around this task (fetching connection) thread. Is there any best way (like setting in somewhere in WAS) to deal with this situation.
Above issue occured due to the fact that our application is sitting in a shared environment where one of the application caused infinite processes in a short time caused 100% CPU utilization... so all the connections to the database in 'hang' state.
The Connection Timeout is how long a thread will wait for the connection pool to give it a connection (not how long the database transaction takes).
You are not able to kill the thread from the WAS layer............you could however create some solutions at the database layer to keep your processes from running away. As far as you transaction goes, you can set the transaction timeout at 3 seconds, but that does not mean that the thread accessing the database is going to stop processing.
girl power ... turns out to be about a hundred watts. But they seriuosly don't like being connected to the grid. Tiny ad: