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