dev@glassfish.java.net

How do we move the control of transaction from MDB to Container in Glassfish

From: kiran tummala <Kiran.Tummala_at_Sun.COM>
Date: Mon, 25 Aug 2008 18:04:11 -0600

Hi,

We have an Message Driven Bean, It subscribes to a message, and based
on message needs to transcode a media file. If there is a failure in
the process, we thrown exceptions and in the exception we are explicitly
calling rollback of message. We would like the container to handle this
process and found this material

"Because JMS is a full-fledged transaction resource manager, JMS work,
such as message consumption, and other transaction work can be grouped
into one transaction. This means that you can choose to make a
message-driven bean part of a transaction or not. The deployment
descriptor transaction attribute, which for a message-driven bean can be
either Required or NotSupported, determines whether or not the bean
participates in a transaction. (If the message-driven bean participates
in a transaction, you must also be using container-managed transaction
demarcation.)"

We would like to use the deployment descriptor transaction attribute and
set it to Required, so that container manages the transaction. How do
we configure this in glassfish. Do we need to do anything special in
Netbeans to achieve this.

thanks,


Kiran

>
>