aspose file tools*
The moose likes Websphere and the fly likes MDB transaction gets rollbacked without exception being logged Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "MDB transaction gets rollbacked without exception being logged" Watch "MDB transaction gets rollbacked without exception being logged" New topic
Author

MDB transaction gets rollbacked without exception being logged

Anton Melumad
Greenhorn

Joined: Jan 17, 2006
Posts: 4
I have a WAS 6.1 application that sends and receives messages via MQ (JMS) and uses Oracle 10 database.

One particular flow involves a CMT MDB (without transaction attribute specified hence REQUIRED is assumed) that picks up a message from a queue, does some business logic including DB update and finally submits a new message to another queue.

This flow is managed by Spring Integration.

Most of the time it works just fine. However, sometimes it fails although no exceptions can be seen in either application or SystemOut and SystemErr logs. On the contrary, the application log confirms successful execution. However, I also see that the same message is processed 5 times with short intervals and then it is put to an error queue. Hence I assume that Websphere transaction is rollbacked causing the message being resubmitted until the max number of retries is reached.

The MDB code invoking the flow is located in a try/catch(Throwable) block so I am sure that potential application exceptions are not being ignored. In fact I have log evidence of business exceptions being correctly logged when they do happen.

My question is what could be the root cause and where could I find a log containing exceptions that are causing the rollback?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

Anton Melumad wrote:
The MDB code invoking the flow is located in a try/catch(Throwable) block so I am sure that potential application exceptions are not being ignored. In fact I have log evidence of business exceptions being correctly logged when they do happen.

My question is what could be the root cause and where could I find a log containing exceptions that are causing the rollback?


If the message is being redelivered then it's a sign that the container considers that the previous invocation failed. Are you sure the transaction isn't timing out? As for the try/catch block in the code, it doesn't guarantee that all exceptions/errors will be caught. Remember that the MDB business logic will be wrapped by the container to include the container specific logic (like commiting a transaction) and that happens after the MDB method completes (i.e. the control has moved out of the try/catch block). Such exceptions will be logged by the server. If they aren't then there's something wrong going on.


[My Blog] [JavaRanch Journal]
Anton Melumad
Greenhorn

Joined: Jan 17, 2006
Posts: 4
Yes, it is quite clear to me that some kind of exception occurs on the level of container. My question is in which log file can I find any trace of this exception?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDB transaction gets rollbacked without exception being logged