10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

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.

Contents<br />

Building, Deploying, and Running the consumeremoteModules Using NetBeans IDE ... 974<br />

Building, Deploying, and Running the consumeremote Modules Using Ant ..................... 975<br />

An Application Example That Deploys a Message-Driven Bean on Two Servers ..................... 977<br />

Overview of the sendremote Example Modules .................................................................... 978<br />

Writing the Module Components for the sendremote Example ......................................... 979<br />

Creating Resources for the sendremote Example .................................................................. 980<br />

Using Two Application Servers for the sendremote Example ............................................. 981<br />

Building, Deploying, and Running the sendremote Modules Using NetBeans IDE ......... 981<br />

Building, Deploying, and Running the sendremote Modules Using Ant ........................... 984<br />

33 Transactions ...................................................................................................................................... 989<br />

What Is a Transaction? ..................................................................................................................... 989<br />

Container-Managed Transactions .................................................................................................. 990<br />

Transaction Attributes .............................................................................................................. 990<br />

Rolling Back a Container-Managed Transaction .................................................................. 994<br />

Synchronizing a Session Bean’s Instance Variables ............................................................... 995<br />

Methods Not Allowed in Container-Managed Transactions ............................................... 995<br />

Bean-Managed Transactions ........................................................................................................... 995<br />

JTA Transactions ....................................................................................................................... 996<br />

Returning without Committing ............................................................................................... 996<br />

Methods Not Allowed in Bean-Managed Transactions ........................................................ 997<br />

Transaction Timeouts ....................................................................................................................... 997<br />

Updating Multiple Databases .......................................................................................................... 997<br />

Transactions in Web Components ................................................................................................. 999<br />

34 Resource Connections ................................................................................................................... 1001<br />

Resources and JNDI Naming ......................................................................................................... 1001<br />

DataSource Objects and Connection Pools ................................................................................. 1002<br />

Resource Injection ........................................................................................................................... 1003<br />

Field-Based Injection ............................................................................................................... 1004<br />

Method-Based Injection .......................................................................................................... 1005<br />

Class-Based Injection .............................................................................................................. 1006<br />

<strong>The</strong> confirmer Example Application ........................................................................................... 1006<br />

Running the confirmer Example Application ..................................................................... 1007<br />

Further Information about Resources .......................................................................................... 1010<br />

25

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

Saved successfully!

Ooh no, something went wrong!