Java Reference
In-Depth Information
The GlassFish Server must be running on both systems.
Before you can run the example, you must change the default name of the JMS host on
jupiter
, as described in “
To Change the Default Host Name Using the Administration
it.
Which system you use to package and deploy the modules and which system you use
to run the client depend on your network configuration (specifically, which file system
you can access remotely). These instructions assume you can access the file system of
jupiter
from
earth
but cannot access the file system of
earth
from
jupiter
.
Clients on Multiple Systems
” on page
398
.
)
You can package both modules on
earth
and deploy the message-driven bean there. The
only action you perform on
jupiter
is running the client module.
Running the
consumeremote
Example
You can use either NetBeans IDE or Ant to build, package, deploy, and run the
con-
sumeremote
example.
To Run the
consumeremote
Example Using NetBeans IDE
To edit the message-driven bean source file and then package, deploy, and run the modules
using NetBeans IDE, follow these steps.
1. From the File menu, choose Open Project.
2. In the Open Project dialog, navigate to:
tut-install
/examples/jms/consumeremote/
3. Select the
earthmdb
folder.
4. Select the Open as Main Project check box.
5. Click Open Project.
6. Edit the
MessageBean.java
file as follows:
a. In the Projects tab, expand the
earthmdb
,
Source Packages, and
mdb
nodes, then double-click
MessageBean.java
.
b. Find the following line within the
@MessageDriven
annotation:
@ActivationConfigProperty(propertyName = "addressList",
propertyValue = "remotesystem"),