![Red Hat Application Server Скачать руководство пользователя страница 131](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406131.webp)
Chapter 9. Developing Message-Driven Beans
123
9.4.1. Launching the Message-Oriented Middleware
If the configuration property
jonas.services
contains the jms service, then the JOnAS JMS service
will be launched and may try to launch a JMS implementation (a MOM).
For launching the MOM, three possibilities can be considered:
1.
Launching the MOM in the same JVM as JOnAS
This is the default situation obtained by assigning the
true
value to the configuration property
jonas.service.jms.collocated
in the
jonas.properties
file.
jonas.services
security,jtm,dbm,jms,ejb
// The jms service must be in the list
jonas.service.jms.collocated
true
In this case, the MOM is automatically launched by the JOnAS JMS service at the JOnAS
launching time (command
jonas start
).
2.
Launching the MOM in a separate JVM
The JORAM MOM can be launched using the command:
JmsServer
For other MOMs, the proprietary command should be used.
The configuration property
jonas.service.jms.collocated
must be set to
false
in the
jonas.properties
file. Setting this property is sufficient if the JORAM’s JVM runs on
the same host as JONAS, and if the MOM is launched with its default options (unchanged
a3servers.xml
configuration file under
JONAS_BASE/conf
or
JONAS_ROOT/conf
if
JONAS_BASE
is not defined).
jonas.services
security,jtm,dbm,jms,ejb
// The jms service must be in the list
jonas.service.jms.collocated
false
To use a specific configuration for the MOM, such as changing the default host (which is local-
host) or the default connection port number (which is 16010), requires defining the additional
jonas.service.jms.url
configuration property as presented in the following case.
3.
Launching the MOM on another host
This requires defining the
jonas.service.jms.url
configuration property. When using JO-
RAM, its value should be the JORAM URL
joram://
host
:
port
where
host
is the host
name, and
port
is the connection port (by default, 16010). For SwiftMQ, the value of the URL
is similar to the following:
smqp://host:4001/timeout=10000
.
jonas.services
security,jtm,dbm,jms,ejb
// The jms service must be in the list
jonas.service.jms.collocated
false
jonas.service.jms.url
joram://host2:16010
9.4.1.1. Change the JORAM default configuration
As mentioned previously, the default host or default connection port number may need to
be changed. This requires modifying the
a3servers.xml
configuration file provided by
the JOnAS delivery in
JONAS_ROOT/conf
directory. For this, JOnAS must be configured
with the property
jonas.service.jms.collocated
set to
false
, and the property
jonas.service.jms.url
set to
joram://host:port
. Additionally, the MOM must
have been previously launched with the
JmsServer
command. This command defines a
Transaction
property set to
fr.dyade.aaa.util.NullTransaction
. If the messages need
to be persistent, replace the
-DTransaction=fr.dyade.aaa.util.NullTransaction
option with the
-DTransaction=fr.dyade.aaa.util.ATransaction
option. Refer to
the JORAM documentation for more details about this command. To define a more complex
Содержание Application Server
Страница 1: ...Red Hat Application Server JOnAS User Guide ...
Страница 8: ......
Страница 22: ...14 Chapter 1 Java Open Application Server JOnAS a J2EE Platform ...
Страница 58: ...50 Chapter 3 JOnAS Configuration ...
Страница 66: ...58 Chapter 5 JOnAS Class Loader Hierarchy ...
Страница 78: ...70 Chapter 6 JOnAS Command Reference ...
Страница 80: ......
Страница 86: ...78 Chapter 7 Developing Session Beans ...
Страница 136: ...128 Chapter 9 Developing Message Driven Beans ...
Страница 142: ...134 Chapter 10 Defining the Deployment Descriptor ...
Страница 148: ...140 Chapter 11 Transactional Behavior of EJB Applications ...
Страница 158: ...150 Chapter 14 EJB Packaging ...
Страница 162: ...154 Chapter 15 Application Deployment and Installation Guide ...
Страница 164: ......
Страница 176: ...168 Chapter 18 WAR Packaging ...
Страница 178: ......
Страница 184: ...176 Chapter 20 Defining the Client Deployment Descriptor ...
Страница 186: ...178 Chapter 21 Client Packaging ...
Страница 188: ......
Страница 192: ...184 Chapter 23 EAR Packaging ...
Страница 194: ......
Страница 200: ...192 Chapter 24 JOnAS Services ...
Страница 204: ...196 Chapter 25 JOnAS and the Connector Architecture ...
Страница 222: ...214 Chapter 27 Ant EJB Tasks Using EJB JAR ...
Страница 234: ...226 Chapter 29 Web Services with JOnAS ...
Страница 236: ......
Страница 260: ...252 Chapter 34 How to use Axis in JOnAS ...
Страница 270: ...262 Chapter 36 Web Service Interoperability between JOnAS and BEA WebLogic ...
Страница 296: ......