Java Reference
In-Depth Information
2. To compile the source files and package the application, use the following
command:
ant
The ant command creates the following:
• An application client JAR file that contains the client class file and the session
bean's remote interface, along with a manifest file that specifies the main class
and places the EJB JAR file in its classpath
• An EJB JAR file that contains both the session bean and the message-driven
bean
• An application EAR file that contains the two JAR files
The clientsessionmdb.ear file is created in the dist directory.
3. To create any needed resources, deploy the application, and run the client, use
the following command:
ant run
Ignore the message that states that the application is deployed at a URL.
The client displays these lines (preceded by application client container output):
Click here to view code image
To view the bean output,
check <install_dir>/domains/domain1/logs/server.log.
The output from the enterprise beans appears in the server log file, wrapped in
logging information. The Publisher session bean sends two sets of 18 messages
numbered 0 through 17. Because of the message selector, the message-driven bean
receives only the messages whose NewsType property is Sports or Opinion .
An Application That Uses the JMS API with an Entity
This section explains how to write, compile, package, deploy, and run an application that
uses the JMS API with an entity. The application uses the following components:
• An application client that both sends and receives messages
• Two message-driven beans
• An entity class
Search WWH ::




Custom Search