Hello there! I have an MDB that calls a SLSB to process a message.
The SLSB perform some operations on the database. The SLSB captures all the exceptions
that might happen never throwing them. But I'm getting in a sistuation where and
SQLException happens, the Transaction is rolled back (even though my code captures it) and
the message gets redelivered untill the threshold is reached.
Here's some sample code:
| private void process(messageID){
| try{
| dao.updateMessage(messageID);
| }catch(Exception e){
| dao.recordError(messageID);
| }
|
| }
|
| //DAO:
|
| public void updateMessage(long messageID){
| try{...}
| catch(SQLEXception e){
| throw new RuntimeException(e);//softening the exception
| }
|
Another issue, is that the record does not persist, even though it is annotated with
REQUIRESNEW transaction attribute.
I know that the container invalidate the transaction on a RuntimeException, but I tought
it had to be thrown in order to the transaction be invalidated.
Any suggestions.
What's wrong here?
REg
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105445#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...