Java Reference
In-Depth Information
6. In the Projects tab, right-click the clientmdbentity project and select
Build.
This task creates the following:
• An application client JAR file that contains the client class and listener class
files, along with a manifest file that specifies the main class
• An EJB JAR file that contains the message-driven beans and the entity class,
along with the persistence.xml file
• An application EAR file that contains the two JAR files along with an ap-
plication.xml file
7. If the Java DB database is not already running, follow these steps:
a. Click the Services tab.
b. Expand the Databases node.
c. Right-click the Java DB node and select Start Server.
8. In the Projects tab, right-click the project and select Run.
This command creates any needed resources, deploys the project, returns a client
JAR file named clientmdbentityClient.jar , and then executes it.
The output of the application client in the Output pane looks something like this:
Click here to view code image
PUBLISHER: Setting hire ID to 50, name Bill Tudor, position Pro-
grammer
PUBLISHER: Setting hire ID to 51, name Carol Jones, position
Senior Programmer
PUBLISHER: Setting hire ID to 52, name Mark Wilson, position Man-
ager
PUBLISHER: Setting hire ID to 53, name Polly Wren, position Seni-
or Programmer
PUBLISHER: Setting hire ID to 54, name Joe Lawrence, position
Director
Waiting for 5 message(s)
New hire event processed:
Employee ID: 52
Name: Mark Wilson
Equipment: PDA
Office number: 294
Waiting for 4 message(s)
New hire event processed:
Employee ID: 53
Name: Polly Wren
Search WWH ::




Custom Search