| Sun Java System Application Server |
This sample application demonstrates a stateful session Enterprise JavaBean (EJB) . The sample consists of an EJB component and a Java application client. The session bean, CartEJB, represents a shopping cart in an online bookstore. The bean's client can add a book to the cart, remove a book, or retrieve the cart's contents.
The general instructions for building, deploying, and running sample applications are provided in Building, Deploying, and Running Sample Applications. In reading this document, use the following application-specific variables for this application:
install_dir is the directory where Application Server is installed.
app_dir is the application base directory: install_dir/samples/ejb/stateful/apps/simple.
stateful-simple.ear.
Follow this general procedure:
build.xml, is in the app_dir
directory, specifically, install_dir/samples/ejb/stateful/apps/simple.
install_dir/samples/ejb/stateful/apps/simple/stateful-simple.ear.
This application has no web client, so to run it you must run the application client. Follow these steps:
cd domain_root_dir/domain_name/samples/ejb/stateful/apps/simple
appclient -client stateful-simpleClient.jar -name CartClient -textauth
You will see the following output:
... The Martian Chronicles 2001 A Space Odyssey The Left Hand of Darkness Caught a BookException: Alice in Wonderland not in cart
Copyright © 2006 Sun Microsystems, Inc. All rights reserved.