aspose file tools*
The moose likes Websphere and the fly likes Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003 " Watch "Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003 " New topic
Author

Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
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
 
wood burning stoves
 
subject: Connect to DB2 using WAS Datasource- StaleConnection,ErrorCode -30,081,SQLState40003
 
Similar Threads
DB2 Setup in Weblogic5.1/6.1
DB2 StaleConnectionException
Unable to catch StaleConnectionException on Websphere 6.1--- Urgent
StaleConnectionException -WebSphere Connection Pool
Communication error