-
1. Re: acknowledgement in MDB
pra Sep 3, 2001 10:14 AM (in response to brijesh)Hi, have you read the JBoss documentation (chapter 7) and the EJB 2.0 spec?
Use setRollbackOnly() with container managed TX, or throw an EJBException with container managed TX.
//Peter -
2. Re: acknowledgement in MDB
brijesh Sep 4, 2001 9:10 AM (in response to brijesh)Hi,
I am using container managed transaction as per stated in chapter 8.
My ejb-jar.xml is as follows
***********
<?xml version="1.0"?>
<!DOCTYPE ejb-jar>
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>MDB1</ejb-name>
<ejb-class>MDB1</ejb-class>
<message-selector/>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>MDB1</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
**************
BUT still the exception is thrown when i use getRollBackOnly() as follows
**********
MessageDriven bean is not allowed to call getRollbackOnly with this trans
action settings
***********
Does I need to do any other settings too?
hope someone will help me out.
Regards,
Brijesh -
3. Re: acknowledgement in MDB
pra Nov 12, 2004 12:00 AM (in response to brijesh)Hi,
I am using container managed transaction as per stated in chapter 8.
My ejb-jar.xml is as follows
***********
<?xml version="1.0"?>
<!DOCTYPE ejb-jar>
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>MDB1</ejb-name>
<ejb-class>MDB1</ejb-class>
<message-selector/>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<ejb-name>MDB1</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
**************
BUT still the exception is thrown when i use getRollBackOnly() as follows
**********
MessageDriven bean is not allowed to call getRollbackOnly with this trans
action settings
***********
Does I need to do any other settings too?
hope someone will help me out.
Regards,
Brijesh