background image

UsingTwo Application Servers

<< Coding the Message-Driven Bean: | Selecting the multiclient Folder >>
<< Coding the Message-Driven Bean: | Selecting the multiclient Folder >>

UsingTwo Application Servers

Using Two Application Servers for the sendremote
Example
If you are using NetBeans IDE, you need to add the remote server in order to deploy the
message-driven bean there. To do so, perform these steps:
1. In NetBeans IDE, click the Runtime tab.
2. Right-click the Servers node and choose Add Server. In the Add Server Instance dialog,
perform these steps:
a. Select Sun Java System Application Server (the default) from the Server list.
b. In the Name field, specify a name slightly different from that of the local server, such as
Sun Java System Application Server (1)
.
c. Click Next.
d. For the Platform Folder location, you can either browse to the location of the
Application Server on the remote system or, if that location is not visible from the local
system, use the default location on the local system.
e. Select the Register Remote Domain radio button.
f. Click Next.
g. Type the system name of the host in the Host field.
h. Click Next.
i. Type the administrative username and password for the remote system in the Admin
Username and Admin Password fields.
j. Click Finish.
There may be a delay while NetBeans IDE registers the remote domain.
Building, Deploying, and Running the sendremote
Modules Using NetBeans IDE
To package the modules using NetBeans IDE, perform these steps:
1. In NetBeans IDE, choose Open Project from the File menu.
2. In the Open Project dialog, navigate to
tut-install/javaeetutorial5/examples/jms/sendremote/.
3. Select the replybean folder.
4. Select the Open as Main Project check box.
5. Click Open Project Folder.
6. Right-click the replybean project and choose Build Project.
An Application Example That Deploys a Message-Driven Bean on Two Servers
Chapter 32 · Java EE Examples Using the JMS API
989