12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

MDBs and transactions<br />

MDBs and transactions<br />

You can set these properties with the DDEditor. From the Console, navigate the tree<br />

on the left until you find the module containing your MDBs. Right-click the module and<br />

select DDEditor. When the DDEditor appears, select the bean node in the Navigation<br />

Pane to open the editor's panels for that bean. Select the “Properties” tab from the<br />

Content pane, and Add properties.<br />

For information about using JMS within transactions, go to Chapter 23, “Using JMS.”<br />

This section deals exclusively with using MDBs in transactions.<br />

A common scenario for using the onMessage() method of MDBs involves transactions<br />

requiring two-phase commit (2PC). Such an MDB has the REQUIRED transaction<br />

attribute. The onMessage() method is written to access and possibly update an external<br />

resource. Completion of the container managed transaction for the MDB method must<br />

include receipt of the message that triggered the method, and any work performed<br />

against the external resource from within the method. To achieve this, the transaction<br />

must be coordinated by a 2PC transaction service, such as the OTS engine. Refer to<br />

EJBs and 2PC Transactions section in Chapter 19, “Transaction management” for<br />

more details on optimal ways to use the OTS engine with MDBs.<br />

Chapter 20: Message-Driven Beans and JMS 189

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!