To compile and package the project, follow these steps:
In NetBeans IDE, select File->Open Project.
In the Open Project dialog, navigate to:
tut-install/examples/jms/ |
Select the clientsessionmdb folder.
Select the Open as Main Project check box and the Open Required Projects check box.
Click Open Project.
In the Projects tab, right-click the clientsessionmdb project and select Build.
This task 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
Right-click the project and select Run.
This command deploys the project, returns a JAR file named clientsessionmdbClient.jar, and then executes it.
The output of the application client in the Output pane looks like this (preceded by application client container output):
To view the bean output, check <install_dir>/domains/domain1/logs/server.log. |
The output from the enterprise beans appears in the server log (domain-dir/logs/server.log), 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.