|
Problem |
Some customers have had difficulty using
Apache's OJB framework on the z/OS version of WebSphere Application Server
4.01. The failures received indicate the OJB framework is trying to use
connections which have already been closed. |
|
Cause |
When trying to use an application using based on OJB, the
following failure was encountered.
Trace: 2003/11/12 13:33:08.223 01 t=ACC8C8 c=4.14 key=P8 (13007002)
FunctionName: com.ibm.connector2.ws390.db2jdbc.DB2JDBCConnectionHandle
SourceId: com.ibm.connector2.ws390.db2jdbc.DB2JDBCConnectionHandle
Category: ERROR
ExtendedMessage: prepareStatement() attempted on closed connection.
org.apache.ojb.broker.accesslayer.StatementsForClassImpl( ERROR:
prepareStatement() attempted on closed connection.
java.sql.SQLException: prepareStatement() attempted on closed
connection.
as well as:
org.apache.ojb.broker.accesslayer.StatementsForClassImpl¨ ERROR:
method is not valid on a closed logical connection.prepareStatem
nt() SQLSTATE=57015 and SQLCODE -923
After reviewing trace output for WebSphere's connector support, it was
noted that connection management was indeed closing a connection. The
application, unaware of this, tries to use the connection again, hence the
failure.
The reason the connection is being closed is because the connection
management policy is set to "Aggressive." This is the case because the
application is using DriverManager.getConnection() instead of a data
source. |
|
Solution |
The only way to not have connection management use
aggressive behavior in this situation is to not use connection management.
To do this, there is a check box on the sysplex object in the system
management administration tool. This check box needs to not be checked.
But this is not sufficient. You must also ensure that the file,
bboaxrt.jar, is not on your application classpath or packaged within your
application.
There may be a performance concern when removing the connection management
support by WebSphere, but in fact, much of the pooling is done by DB2 and
JDBC. There should be a very minimal impact. |
|
|
|
|
|
|
|