
The Remove Method ................................................................................................................. 643
Helper Classes ............................................................................................................................. 644
Building, Packaging, Deploying, and Running the cart Example ...................................... 644
Undeploying the cart Example ............................................................................................... 646
A Web Service Example: helloservice ......................................................................................... 646
The Web Service Endpoint Implementation Class ................................................................ 647
Stateless Session Bean Implementation Class ........................................................................ 647
Building, Packaging, Deploying, and Testing the helloservice Example ........................ 648
Using the Timer Service .................................................................................................................... 649
The Timeout Method ................................................................................................................. 649
Creating Timers ......................................................................................................................... 650
Canceling and Saving Timers ................................................................................................... 650
Getting Timer Information ...................................................................................................... 651
Transactions and Timers .......................................................................................................... 651
The timersession Example ..................................................................................................... 651
Building, Packaging, Deploying, and Running the timersession Example ...................... 652
Handling Exceptions ......................................................................................................................... 654
23 A Message-Driven Bean Example ...................................................................................................657
simplemessage Example Application Overview ........................................................................... 657
The simplemessage Application Client ......................................................................................... 658
The Message-Driven Bean Class ..................................................................................................... 659
The onMessage Method ............................................................................................................. 659
Packaging, Deploying, and Running the simplemessage Example ............................................ 660
Creating the Administered Objects for the simplemessage Example ................................. 661
Building, Deploying, and Running the simplemessage Application Using NetBeans
IDE ............................................................................................................................................... 661
Building, Deploying, and Running the simplemessage Application Using Ant ............... 662
Removing the Administered Objects for the simplemessage Example .............................. 663
Creating Deployment Descriptors for Message-Driven Beans ................................................... 663
Part V Persistence ..........................................................................................................................................665
24 Introduction to the Java Persistence API ...................................................................................... 667
Entities ................................................................................................................................................ 667
Contents
19