To edit the message-driven bean source file and then package, deploy, and run the modules using Ant, follow these steps.
Open the file tut-install/examples/jms/consumeremote/earthmdb/src/java/mdb/MessageBean.java in an editor.
Find the following line within the @MessageBean annotation:
@ActivationConfigProperty(propertyName = "addressList", propertyValue = "remotesystem"),
Replace remotesystem with the name of your remote system, then save and close the file.
Go to the following directory:
tut-install/examples/jms/consumeremote/earthmdb/
Type the following command:
ant |
This command creates a JAR file that contains the bean class file.
Type the following command:
ant deploy |
Go to the jupiterclient directory:
cd ../jupiterclient |
Type the following command:
ant |
This target creates a JAR file that contains the client class file and a manifest file.
To copy the jupiterclient module to the remote system, follow these steps:
To run the application client, follow these steps:
Go to the directory on the remote system (jupiter) where you copied the client JAR file.
To deploy the client module and retrieve the client stubs, use the following command:
asadmin deploy --retrieve . jupiterclient.jar |
This command deploys the client JAR file and retrieves the client stubs in a file named jupiterclientClient.jar
To run the client, use the following command:
appclient -client jupiterclientClient.jar |
On jupiter, the output of the appclient command looks like this (preceded by application client container output):
Sending message: This is message 1 from jupiter Sending message: This is message 2 from jupiter Sending message: This is message 3 from jupiter |
On earth, the output in the server log looks something like this (preceded by logging information):
MESSAGE BEAN: Message received: This is message 1 from jupiter MESSAGE BEAN: Message received: This is message 2 from jupiter MESSAGE BEAN: Message received: This is message 3 from jupiter |