Hi, I�m using Websphere 4 in a application and i have this problem : I read a file with 13000 lines and then execute line to line a block of sentences in a loop with a DB2 7.2. In this block of sentences i open transaction and finally i do commit or rollback. block of sentences in a loop for. The connection i get of the connection datasource of the Websphere and i use only one connection. The error i have with multiples conections (open and close the connection for line... each 20 lines, etc..). Too, the error is the same if all lines is commit or rollback... or having commit or rollback between 10 to 10.... 20 to 20, etc..
Well, ever i have this error in all test that i do, com.ibm.websphere.ce.cm.StaleConnectionException: class com.ibm.ejs.cm.proxy.ResultSetProxy is closed
exactly in the line 1945
The configuration of the WAS is the tipically. All resultset and statements are open ok and closed in the finally blocks, i�m sure, work ok.
Hi Miguel, The StaleConnection may be happening because your connection is being closed before you can finish the transaction you opened it for. If the websphere settings are the default then i dont think the problem is the app server. Webshpere creates a pool of connections withing the Datasource, these connections have a lifetime and you can modify that time in your Datasource settings. I think you have to check the net and the DB2 connection settings. I havent had this problem with DB2 but with Oracle. I solved it by changing the connection timeout setting in the Oracle Server, because it was lower than the WAS timeout for the connections in the pool, i also checked for the TCP/IP connections in the LAN. Try checking those parameters.
SCJP 1.4, <br />IBM Certified System Administrator Websphere Application Server 5.0, IBM Certified DB2 UDB Database Associate