Hello there! This is a basic question, it's more related to ejb-spec I guess, 
but since JBoss is my default AS, I hope you guys could help me out here ;)

Ok, I have an MDB with CMT. This MDB calls an ApplicationService (just a POJO) 
that performs our business logic. In case something bad happens, let's say, an 
SQL error from Hibernate, one should rollback the transaction.

My question is suppose my onMessage(Message message) method has this snippet:

try{
service.doSomething();
}catch(BusinessLogicException ex){
logger.error(ex);
ctx.setRollBackOnly();
}

This will rollback my transaction, but also cause my message to be re-delivered 
right? I've seen implementations with BMT where we could acknowledge the 
message, but I really would like to keep using CMT.

Well, my question is just about the behaviour of the conteiner, is this what 
really happens when a rollback is issued from a MDB?

I guess avoiding redelivery should be easy since you guyse helped me with that 
in another topic ;)

Thanks all..



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3893213#3893213

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3893213


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to