background image

Deploying the cart Example

<< The Remove Method | Running the cart Application >>
<< The Remove Method | Running the cart Application >>

Deploying the cart Example

Building, Packaging, and Deploying the cart Example Using NetBeans
IDE
Follow these instructions to build, package, and deploy the cart example to your Application
Server instance using the NetBeans IDE IDE.
1. In NetBeans IDE, select File
Open Project.
2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/ejb/.
3. Select the cart folder.
4. Select the Open as Main Project and Open Required Projects check boxes.
5. Click Open Project Folder.
6. In the Projects tab, right-click the cart project and select Deploy Project.
This builds and packages the application into cart.ear, located in
tut-install/javaeetutorial5/examples/ejb/cart/dist/, and deploys this EAR file to your
Application Server instance.
Running the cart Application Client Using NetBeans IDE
To run cart's application client, select Run
Run Main Project. You will see the output of the
application client in the Output pane:
...
Retrieving book title from cart: Infinite Jest
Retrieving book title from cart: Bel Canto
Retrieving book title from cart: Kafka on the Shore
Removing
"Gravity's Rainbow" from cart.
Caught a BookException:
"Gravity's Rainbow" not in cart.
Java Result: 1
run-cart-app-client:
run-nb:
BUILD SUCCESSFUL (total time: 14 seconds)
The cart Example
Chapter 22 · Session Bean Examples
663