background image

Selecting the multiclient Folder

<< UsingTwo Application Servers | Output of the appclient Command >>
<< UsingTwo Application Servers | Output of the appclient Command >>

Selecting the multiclient Folder

This command creates a JAR file that contains the bean class file.
7. Choose Open Project from the File menu.
8. Select the multiclient folder.
9. Select the Open as Main Project check box.
10. Click Open Project Folder.
11. Right-click the multiclient project and choose Build Project.
This command creates a JAR file that contains the client class file and a manifest file.
To deploy the multiclient module on the local server, perform these steps:
1. Right-click the multiclient project and choose Properties.
2. Select Run from the Categories tree.
3. From the Server list, select Sun Java System Application Server (the local server).
4. Click OK.
5. Right-click the multiclient project and choose Deploy Project.
To deploy the replybean module on the local and remote servers, perform these steps:
1. Right-click the replybean project and choose Properties.
2. Select Run from the Categories tree.
3. From the Server list, select Sun Java System Application Server(the local server).
4. Click OK.
5. Right-click the replybean project and choose Deploy Project.
6. Right-click the replybean project again and choose Properties.
7. Select Run from the Categories tree.
8. From the Server list, select Sun Java System Application Server (1) (the remote server).
9. Click OK.
10. Right-click the replybean project and choose Deploy Project.
You can use the Runtime tab to verify that multiclient is deployed as an App Client Module
on the local server and that replybean is deployed as an EJB Module on both servers.
To run the application client, right-click the multiclient project and choose Run Project.
This command returns a JAR file named multiclientClient.jar and then executes it.
On the local system, the output of the appclient command looks something like this:
running application client container.
Sent message: text: id=1 to local app server
Sent message: text: id=2 to remote app server
An Application Example That Deploys a Message-Driven Bean on Two Servers
The Java EE 5 Tutorial · September 2007
990