![Red Hat Application Server Manual Download Page 213](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406213.webp)
Chapter 26. JMS User’s Guide
205
26.4.1. JMS Service Administration
To use the JMS service in the default configuration, all that is necessary is requiring the use of the
JMS service in the
jonas.properties
file:
jonas.services
security,jtm,dbm,jms,ejb
JOnAS will not create additional connection factories when using the default configuration. How-
ever, JOnAS can create requested destination objects at server launching time, if specified in the
jonas.properties
file. To do this, specify the JNDI names of the Topic and Queue destination ob-
jects to be created in a
jonas.service.jms.topics
and
jonas.service.jms.queues
property
respectively, as follows:
// JOnAS server creates 2 topic destinations (t1,t2)
jonas.service.jms.topics t1,t2
// JOnAS server creates 1 queue destination (myQueue)
jonas.service.jms.queuesmyQueue
It is recommended that programmers use
resource references
and
resource environment references
to
access the connection factories and destination objects created by JOnAS, as presented in Section 26.2
Writing JMS Operations Within an Application Component
.
26.4.2. JMS Resource Adapter Configuration
Starting with JOnAS release 4.1, it is recommended that you deploy a JMS resource adapter instead of
using the
jms
service. How to do this is explained in Section 3.7
Configuring JMS Resource Adapters
.
26.5. Running an EJB Performing JMS Operations
All that is necessary to have an Enterprise Bean perform JMS operations is:
jonas start
The Message-Oriented Middleware (the JMS provider implementation) is automatically started (or
at least accessed) and the JMS-administered objects that will be used by the Enterprise Beans are
automatically created and registered in JNDI.
Then, the EJB can be deployed as usual with:
jonas admin -a
XX
.jar
26.5.1. Accessing the Message-Oriented Middleware as a Service
If the JOnAS property
jonas.services
contains the
jms
service, the JOnAS JMS service will be
launched and will eventually try to launch a JMS implementation (for example, the JORAM MOM or
the SwiftMQ MOM) through the JMS service in the JOnAS properties file.
For launching the MOM, consider the following possibilities:
•
Launching the MOM automatically in the JOnAS JVM.
This is done using the default values for the configuration options (that is, keeping the JOnAS
property
jonas.service.jms.collocated
value
true
in the
jonas.properties
file (see
the
jonas.properties
file provided in
$JONAS_ROOT/conf
directory)).
jonas.service.jms.collocated true
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: ......