|
Home TOC Index |
|
Search
Feedback |
Running the SimpleMessageEJB Example
Starting the J2EE Server
To view the output of the message-driven bean, you must start the server in verbose mode:
j2ee -verboseCreating the Queue
- Create the queue with the
j2eeadmincommand:j2eeadmin -addJmsDestination jms/MyQueue queue- Verify that the queue was created:
j2eeadmin -listJmsDestinationDeploying the Application
- In
deploytool,open thej2eetutorial/examples/ears/SimpleMessageApp.earfile (FileOpen).
- Deploy the
SimpleMessageAppapplication (ToolsDeploy). In the Introduction dialog box, make sure that you select the Return Client JAR checkbox. For detailed instructions, see Deploying the J2EE
Application.
Running the Client
- In a terminal window, go to the
j2eetutorial/examples/earsdirectory.- Set the
APPCPATHenvironment variable toSimpleMessageAppClient.jar.- Type the following command on a single line:
runclient -client SimpleMessageApp.ear -name SimpleMessageClient -textauth- At the login prompts, enter
j2eefor the user name andj2eefor the password.- The client displays these lines:
Sending message: This is message 1 Sending message: This is message 2 Sending message: This is message 3- In the terminal window in which you've started the J2EE server (in verbose mode), the following lines should be displayed:
MESSAGE BEAN: Message received: This is message 1 MESSAGE BEAN: Message received: This is message 2 MESSAGE BEAN: Message received: This is message 3
|
Home TOC Index |
|
Search
Feedback |