A blog about Java technology, Software development and other interesting topics.
Thursday, February 07, 2008
DB connection error in websphere + iSeries
Recently we have a stale connections problems in a WebSphere App server running on iSeries database. I realized the problem might be the getConnection() method is not synchronized(serialized) at the JDBC driver implementation. So two threads can potentially get the same connection and step on each other. It sounds like a bug to me. The solution is easy, just synchronize the code that call getConnection() method, of course, I am assuming the calling class is already in a Singleton mode.