aspose file tools*
The moose likes JDBC and the fly likes DSRA9110E Connection is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DSRA9110E Connection is closed" Watch "DSRA9110E Connection is closed" New topic
Author

DSRA9110E Connection is closed

ricky wong
Greenhorn

Joined: Jan 27, 2003
Posts: 22
Dear all,

My MDB EJB application retrieves a MQ message, it creates a thread to handle this MQ message. This thread uses SQLJ and datasource to connect to DB2 and insert/update all data to database. When the number of MQ Messages (e.g. 10, 100) are received by MDB and the corresponding of threads are trying to insert/update its data to DB2, some of threads get an error "DSRA9110E; Connection is closed".

Each thread creates its own connection and dbcontext objects and the transaction is quite short (Only insert/update data to around 3 tables). In addition, the MQ message of each thread has a unique id. The unique id is a primary key of the tables.

As I am new to SQLJ, does anyone know what is the problem? I have tried to add logic to check whether a DBConnection is closed or not after getting it from datasource. It seems that all connections are not closed when received from datasource but some of them are closed during the transaciton processing (when a number of threads are running). Could anyone give me advise or suggestion?

I am using WSAD v5.1.2 and DB2 v7.2.3 (Windows version). I am not sure this problme is still occurred when deploying the EJB application to WAS v5.1.

Thanks.
Ricky
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
Does each method which uses a Connection declare a local Connection variable? Anything else is not thread safe.


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
ricky wong
Greenhorn

Joined: Jan 27, 2003
Posts: 22
Yes, it is defined a private variable. For the thread safe, how can I define it?
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
I think you need to post your code.
 
Don't get me started about those stupid light bulbs.
 
subject: DSRA9110E Connection is closed
 
Similar Threads
ObjectClosedException: DSRA9110E: Statement is closed
com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
Multhreading In JDBC
DSRA9110E: ResultSet is closed
DSRA9110E: Statement is closed issue occurs randomly while executing queries