On Fri, 2004-01-09 at 07:14, [EMAIL PROTECTED] wrote:
> Hi,
> 
> I have a MDB which takes messages from a Queue.
> In the onMessage() method, I am working with
> CMP beans. If something goes wrong, I want the JMS
> message to be redelivered, but the changes on the CMP
> beans should not be rolled back.
> 
> As I understand it, the only way to force re-delivery of the JMS message
> is to throw an EJBException to force JBoss to rollback
> the transaction. But this also rolles back the changes on the
> CMP beans...
> 

For the n thousandth time use
messageDrivenContext.setRollbackOnly() to rollback the transaction.

If you want CMP to be isolated, use "RequiresNew" to suspend the
JMS transaction and perform the DB activity in a new transaction.

Regards,
Adrian

> Is there an obvious solution I am not seeing ?

> Thanks in advance,
> 
> Stefan
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
xxxxxxxxxxxxxxxxxxxxxxxx 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
xxxxxxxxxxxxxxxxxxxxxxxx 



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to