|
Java Message Service Resource Access From a Rich Client:
| |||||||||||||||||||||||||||||||||||||||||||||||||
|
We want to hear from you! Please send us your
FEEDBACK.
The following software tool may contain actual software programs in source code form. This source code is made available for developers to use as needed, pursuant to the terms and conditions of this license. OverviewA rich client is a standalone Java platform program that can directly access Enterprise JavaBeans (EJBs) deployed on a Sun ONE Application Server. Traditionally, clients communicate with the Sun ONE Application Server through the Web tier; for example, clients using HTTP communicate with server components such as JavaServer Pages (JSPs) and Servlets which will in turn hand access to EJBs within the server context. The Java 2 Platform, Enterprise Edition (J2EE) v1.3 specification, however, requires that standalone clients be able to talk to the Sun ONE Application Server using the RMI-IIOP standard. The J2EE v1.3 specification also requires that these standalone clients operate within the Application Client Container (ACC) context. The ACC approach isolates server-specific issues, leaving clients completely portable. The Sun ONE Application Server allows Java platform clients to directly access EJBs on a Sun ONE Application Server. These clients can operate within an ACC that ships with the Sun ONE Application Server or can use a direct access approach (a non ACC path). This code sample illustrates a simple example of looking up Java Message Service (JMS) resources, and sending messages to, as well as receiving messages from a queue, via a standalone application. In the second part of the code sample, the same application is modified to work with ACC to access JMS resources . The complete sample can be downloaded from here.
I. Standalone Client Without ACC
Compiling and Assembling the Sample Application:
compile-simple - This will compile the
sample program.
We do not pass any environment properties
to the
Deploying the Sample Application:
Configuring Resources:
run-setup-jms - Configure JMS resources
to run the sample code.
Modify the following Application Server installation-specific parameters
in setup.xml: jmshost - Application Server hostname adminusr - Admin instance user name adminpwd - Admin instance user password adminport - Admin instance port number The
run-client - Run the sample program to
send and receive message.
If the Application Server is on a different system,
we need to copy all the
The key points to note in the build file are the
Java Virtual Machine startup options:
Here The program output will be: [echo] Running the Standalone JMS client program: SEVERE: UTIL6034:Could not initialize ORB
monitoring
java.lang.IllegalStateException: Monitorable
component can not be registered
The logging error comes from the server's ORBManager
trying to register
|
DOC ID 1839