I call this method from within onMessage.  

I looked at the source for MessageDrivenEnterpriseContext.setRollbackOnly
which checks for an acknowledge mode of CLIENT_ACKNOWLEDGE.  I added some
debugging code the actual value here when I invoke is AUTO_ACKNOWLEDGE.
Maybe the code should check for a container managed transaction instead.

-----Original Message-----
From: Saint-Martin Cecile [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 3:11 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] MessageDrivenBean and setRollbackOnly


In wich method do you call setRollbackOnly? You can call this method only in
onMessage method.

EJB 2.0 final specifications :
<<The getRollbackOnly and setRollbackOnly methods of the
MessageDriven-Context
interface should be used only in the message-driven bean methods that
execute in
the context of a transaction. The Container must throw the
java.lang.IllegalState-Exception
if the methods are invoked while the instance is not associated with a
transaction.>>

SAINT-MARTIN Cecile
[EMAIL PROTECTED]

> -----Message d'origine-----
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]De la part de Griffin,
> Michael
> Envoyé : mardi 19 juin 2001 22:02
> À : '[EMAIL PROTECTED]'
> Objet : [JBoss-user] MessageDrivenBean and setRollbackOnly
>
>
> Has anyone used setRollbackOnly from a MessageDrivenBean using Container
> managed transactions?  When I call this method on the MessageDrivenContext
> an IllegalStateException is thrown.  As far as I can tell, I
> should be able
> to call this within the scope of the onMessage method when the
> Container is
> managing the transaction.
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to