HI-
I have a need to log errors to a table while processing inside a message driven bean. Unfortunately, this is quite difficult as the global transaction is always rolled-back.
Is there any way to accomplish this? I could use JTA, but I lose the inclusion of the initial message read in the transaction, which is half the benefit of the CMT.
Any ideas?
-
Error Logging to a table in MDB's with CMT??? (3 messages)
- Posted by: Brandon Ridenour
- Posted on: February 19 2004 15:46 EST
Threaded Messages (3)
- Error Logging to a table in MDB's with CMT??? by Mircea Crisan on February 20 2004 02:25 EST
- Error Logging to a table in MDB's with CMT??? by Bostjan Dolenc on February 20 2004 02:47 EST
- that worked by Brandon Ridenour on February 21 2004 09:23 EST
-
Error Logging to a table in MDB's with CMT???[ Go to top ]
- Posted by: Mircea Crisan
- Posted on: February 20 2004 02:25 EST
- in response to Brandon Ridenour
Hi,
I would consider isolating the database logging code in a session bean with 'RequiresNew' transacation attribute. Another solution would be to send a message with the errors to another MDB specialized in consuming error messages.
Best regards, Mircea. -
Error Logging to a table in MDB's with CMT???[ Go to top ]
- Posted by: Bostjan Dolenc
- Posted on: February 20 2004 02:47 EST
- in response to Mircea Crisan
We used the session bean approach once and found no problems with it. It's easy to set up and to use. Also, you do not have to worry about ordered delivery as you (sometimes) have to with the MDB approach. -
that worked[ Go to top ]
- Posted by: Brandon Ridenour
- Posted on: February 21 2004 09:23 EST
- in response to Brandon Ridenour
the session bean approach works great!
not sure if the MDB approach would work, as the sending of the JMS message should get rolled back as part of a failed transaction?