![Red Hat Application Server Manual Download Page 205](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406205.webp)
Chapter 26.
JMS User’s Guide
This chapter is provided for advanced JOnAS users concerned with JMS (Java Message Service).
As required by the J2EE v1.4 specification, application components (servlets and enterprise beans)
can use JMS for Java messaging. Furthermore, applications can use Message-driven Beans (MDBs)
for asynchronous EJB method invocation, as specified by the EJB 2.1 specification.
JOnAS supports the JMS 1.1 specification, which offers a domain-independent approach to pro-
gramming the client application. Priot to JMS 1.1, client programming for point-to-point and pub-
lish/subscribe domains was achieved using similar, but separate, class hierarchies. With JMS 1.1, it is
now possible to engage queues and topics in the same transaction.
Enterprise Bean providers can use JMS connection factory resources via
resource references
, and
JMS destination resources (JMS queues and JMS topics) via
resource environment references
. Thus,
they are able to provide JMS code, inside an EJB method or web component method, for sending or
synchronously receiving messages to/from a JMS queue or topic.
The EJB container and the Web container can allow for JMS operations within a global transaction,
which may include other resources such as databases.
JOnAS integrates a third-party JMS implementation, JORAM (http://joram.objectweb.org/), which is
the default JMS service, and for which a J2EE1.4 compliant Resource Adapter archive file is also
provided. Other JMS providers, such as SwiftMQ (http://www.swiftmq.com/) and WebSphere MQ
(http://www-3.ibm.com/software/integration/mqfamily/), can easily be integrated.
A JMS provider can be integrated within JOnAS by deploying a corresponding
resource adapter
.
This is the preferred method as the JMS service will eventually become deprecated in future JOnAS
releases. Also, this method allows deployment of 2.1 MDBs (which is impossible with the JMS ser-
vice).
To perform JMS operations, application components use JMS-administered objects such as connec-
tion factories and destinations. Refer to Section 26.4
JMS Administration
for an explanation of how
to create those objects.
26.1. JMS is Pre-installed and Configured
To use JMS with JOnAS, no additional installation or configuration operations are required. JOnAS
contains:
•
The Java[TM] Message Service API 1.1, currently integrated with the JOnAS distribution,
•
A JMS implementation. Currently, the OpenSource JORAM (http://joram.objectweb.org), is inte-
grated with the JOnAS distribution; thus no installation is necessary.
Additionally, another JMS implementation, the SwiftMQ product, has been used with JOnAS.
26.2. Writing JMS Operations Within an Application Component
To send (or synchronously receive) JMS messages, an application component requires access to JMS-
administered objects (that is, to connection factories for creating connections to JMS resources, and
to destination objects (queue or topic), which are the JMS entities used as destinations within JMS
sending operations). Both are made available through JNDI by the JMS provider administration facil-
ity.
Summary of Contents for Application Server
Page 1: ...Red Hat Application Server JOnAS User Guide ...
Page 8: ......
Page 22: ...14 Chapter 1 Java Open Application Server JOnAS a J2EE Platform ...
Page 58: ...50 Chapter 3 JOnAS Configuration ...
Page 66: ...58 Chapter 5 JOnAS Class Loader Hierarchy ...
Page 78: ...70 Chapter 6 JOnAS Command Reference ...
Page 80: ......
Page 86: ...78 Chapter 7 Developing Session Beans ...
Page 136: ...128 Chapter 9 Developing Message Driven Beans ...
Page 142: ...134 Chapter 10 Defining the Deployment Descriptor ...
Page 148: ...140 Chapter 11 Transactional Behavior of EJB Applications ...
Page 158: ...150 Chapter 14 EJB Packaging ...
Page 162: ...154 Chapter 15 Application Deployment and Installation Guide ...
Page 164: ......
Page 176: ...168 Chapter 18 WAR Packaging ...
Page 178: ......
Page 184: ...176 Chapter 20 Defining the Client Deployment Descriptor ...
Page 186: ...178 Chapter 21 Client Packaging ...
Page 188: ......
Page 192: ...184 Chapter 23 EAR Packaging ...
Page 194: ......
Page 200: ...192 Chapter 24 JOnAS Services ...
Page 204: ...196 Chapter 25 JOnAS and the Connector Architecture ...
Page 222: ...214 Chapter 27 Ant EJB Tasks Using EJB JAR ...
Page 234: ...226 Chapter 29 Web Services with JOnAS ...
Page 236: ......
Page 260: ...252 Chapter 34 How to use Axis in JOnAS ...
Page 270: ...262 Chapter 36 Web Service Interoperability between JOnAS and BEA WebLogic ...
Page 296: ......