Handling Database Failures in MDB
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sanjeev_Kasarabada
Posted On:   Tuesday, July 9, 2002 12:34 PM

This whole process was done to test DB Failures for our Asynchronous Messaging using PtoP. We are having some threading issues in our Message Driven BEans. Here is the breakdown Currently in one of our MDB deployed in Weblogic 6.1 Sp1 is doing the following in the onMessage()... (Since one of the process in the message takes a long time we had NotSupported as the transaction attribute for the onMessage()). (1)Call DB to update a certain value which sets the state to running. (2)Spawn a new thread which runs the long process and might even take several hours. (3)Checks the DB for the status intermittently(every 15 seconds ) to see if (2) is complete.    More>>

This whole process was done to test DB Failures for our Asynchronous Messaging using PtoP.


We are having some threading issues in our Message Driven BEans.

Here is the breakdown


Currently in one of our MDB deployed in Weblogic 6.1 Sp1 is doing the following in the onMessage()...

(Since one of the process in the message takes a long time we had NotSupported as the transaction attribute for the onMessage()).


(1)Call DB to update a certain value which sets the state to running.


(2)Spawn a new thread which runs the long process and might even take several hours.



(3)Checks the DB for the status intermittently(every 15 seconds ) to see if (2) is complete.


(4)Here we bring down DB.


(5)Process (2) keeps going as it is a separate thread and it does not do any DB updates.


(6)Bring back DB


(7)Process (2) completes . According to the normal flow is should come back to the onMessage() handler and do some DB updates. But it does not. It just finishes and nothing happens.

We want it come back and continue the rest of the onMessage() handler. because the state of the process is left as "running " in the DB.



So I am wondering what has happened to the MDB at this point? Did it loose communication to the process(2) since it spawned a new thread????



Any pointers on this is greatly appreciated.


Thanx,


Sanjeev

   <<Less

Re: Handling Database Failures in MDB

Posted By:   Gautam_Marwaha  
Posted On:   Wednesday, July 10, 2002 01:30 AM

Are you catching exceptions in MDB and printing stacktraces?

Are you seeing any exceptions/messages in Weblogic log?

Are you using a JDBC backed JMS store which uses a conn.
pool pointing to the same database which is being shutdown?
About | Sitemap | Contact