This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I configured datasource in WAS5.1x to connect to DB2. DB2 runs in mainframe.
On my first attempt to connect to DB2, I get Staleconnection error. It works fine for consecutive attempts to connect to DB2 using WAS datasource.
From what I understand, it fails (or, shows StaleConnection) as the connection that it is holding from pool is stale. However, if it is the first attempt to connect to DB2 by the first user (first user of the application for testing purpose), I should not see this symptom.
I looked at connection pooling and did not make any difference by raising connection size etc.
Do I need further configurations in WAS datasource to make sure that stateconnection does not happen? DB2 was up and running all the time.
I get error below on my first attempt only. On consecutive attempts, it successfully connects to datasource.
I get error below:
StaleConnecti A CONM7007I: Mapping the following SQLException, with ErrorCode -30,081 and SQLState 40003, to a StaleConnectionException: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "". Communication function detecting the error: "recv". Protocol specific error code(s): "*", "*", "0". SQLSTATE=08001
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003