Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

MDB transaction gets rollbacked without exception being logged

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Anton Melumad
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
mooooooo ..... tiny ad ....
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic