Java EE Examples Using the JMS API (original) (raw)
2. Using the Tutorial Examples
3. Getting Started with Web Applications
5. JavaServer Pages Technology
7. JavaServer Pages Standard Tag Library
10. JavaServer Faces Technology
11. Using JavaServer Faces Technology in JSP Pages
12. Developing with JavaServer Faces Technology
13. Creating Custom UI Components
14. Configuring JavaServer Faces Applications
15. Internationalizing and Localizing Web Applications
16. Building Web Services with JAX-WS
17. Binding between XML Schema and Java Classes
19. SOAP with Attachments API for Java
21. Getting Started with Enterprise Beans
23. A Message-Driven Bean Example
24. Introduction to the Java Persistence API
25. Persistence in the Web Tier
26. Persistence in the EJB Tier
27. The Java Persistence Query Language
28. Introduction to Security in the Java EE Platform
29. Securing Java EE Applications
31. The Java Message Service API
A Java EE Application That Uses the JMS API with a Session Bean
Writing the Application Components for the clientsessionmdb Example
Coding the Application Client: MyAppClient.java
Coding the Publisher Session Bean
Coding the Message-Driven Bean: MessageBean.java
Creating Resources for the clientsessionmdb Example
Building, Deploying, and Running the clientsessionmdb Example Using NetBeans IDE
Building, Deploying, and Running the clientsessionmdb Example Using Ant
A Java EE Application That Uses the JMS API with an Entity
Overview of the clientmdbentity Example Application
Writing the Application Components for the clientmdbentity Example
Coding the Application Client: HumanResourceClient.java
Coding the Message-Driven Beans for the clientmdbentity Example
Coding the Entity Class for the clientmdbentity Example
Creating Resources for the clientmdbentity Example
Building, Deploying, and Running the clientmdbentity Example Using NetBeans IDE
Building, Deploying, and Running the clientmdbentity Example Using Ant
An Application Example That Consumes Messages from a Remote Server
Overview of the consumeremote Example Modules
Writing the Module Components for the consumeremote Example
Creating Resources for the consumeremote Example
Using Two Application Servers for the consumeremote Example
Building, Deploying, and Running the consumeremoteModules Using NetBeans IDE
Building, Deploying, and Running the consumeremote Modules Using Ant
An Application Example That Deploys a Message-Driven Bean on Two Servers
Overview of the sendremote Example Modules
Writing the Module Components for the sendremote Example
Coding the Application Client: MultiAppServerClient.java
Coding the Message-Driven Bean: ReplyMsgBean.java
Creating Resources for the sendremote Example
Using Two Application Servers for the sendremote Example
Building, Deploying, and Running the sendremote Modules Using NetBeans IDE
Building, Deploying, and Running the sendremote Modules Using Ant
36. The Coffee Break Application
37. The Duke's Bank Application
Chapter 32
Java EE Examples Using the JMS API
This chapter provides examples that show how to use the JMS API within a Java EE application in the following ways:
- Using a session bean to send messages that are consumed by a message-driven bean using a message selector and a durable subscription
- Using an application client to send messages that are consumed by two message-driven beans; the information from them is stored in a Java Persistence API entity
- Using an application client to send messages that are consumed by a message-driven bean on a remote server
- Using an application client to send messages that are consumed by message-driven beans on two different servers
The examples are in the following directory:
tut-install/javaeetutorial5/examples/jms/
To build and run the examples, you will do the following:
- Use NetBeans IDE or the Ant tool to compile and package the example.
- Use the Ant tool to create resources.
- Use NetBeans IDE or the Ant tool to deploy the example.
- Use NetBeans IDE or the Ant tool to run the client.
Each example has a build.xml file that refers to files in the following directory:
tut-install/javaeetutorial5/examples/bp-project/
See Chapter 23, A Message-Driven Bean Example for a simpler example of a Java EE application that uses the JMS API.
Copyright © 2010, Oracle and/or its affiliates. All rights reserved. Legal Notices