22
Chapter 3. JOnAS Configuration
This copies all the required files and creates all the directories.
Note
The
build.xml
files provided with the JOnAS examples support
JONAS_BASE
. If this environment
variable is defined prior to building and installing the examples, the generated archives are installed
under the appropriate sub-directory of
$JONAS_BASE
. For example, the EJB-JAR files corresponding
to the sample examples of
$JONAS_ROOT/examples/src/
are installed in
$JONAS_BASE/ejbjars
.
3.2. Configuring the JOnAS Environment
3.2.1. The JOnAS Configuration File
The JOnAS server is configured via a configuration file named
jonas.properties
. It contains a list
of key/value pairs presented in the Java properties file format.
The default configuration is provided in
$JONAS_ROOT/conf/jonas.properties
(refer to
$JONAS_BASE/conf/jonas.properties
). This file, which holds all possible properties with
their default values, is mandatory. The JOnAS server looks for this file at start time in the
$JONAS_BASE/conf
directory (
$JONAS_ROOT/conf
if
$JONAS_BASE
is not defined).
Most of the properties are related to the JOnAS services that can be launched in the JOnAS server.
These properties are described in detail in Section 3.5
Configuring JOnAS Services
.
The property
jonas.orb.port
is not related to any service. It identifies the port number on which
the remote objects receive calls. Its default value is
0
, which means that an anonymous port is chosen.
When the JOnAS server is behind a firewall, this property can be set to a specific port number.
When several JOnAS servers must run simultaneously, it is beneficial to set a different name for each
JOnAS server in order to administer these servers.
Also note that it is possible to define configuration properties on the command line:
java -D
property=value
Use the
jonas check
command to review the JOnAS configuration state. (Refer to Section 6.1
jonas
.)
3.2.2. Configuration Scripts
The
JOnAS
distribution
contains
the
$JONAS_ROOT/bin/unix/setenv
and
$JONAS_ROOT/bin/unix/config_env
configuration scripts.
These configuration scripts set useful environment variables for JAVA setup (
$JAVA
and
$JAVAC
).
They add
$JONAS_BASE/conf
to the
$CLASSPATH
if
$JONAS_BASE
is set, otherwise they add
$JONAS_ROOT/conf
. These scripts are called by almost all other scripts (
jclient
,
jonas
,
newbean
,
registry
,
GenIC
).
Therefore, when requiring the visibility of specific
.jar
files, the best practice is to update the
config_env
file. For example, to see some of the JDBC driver classes, one or more of the variables
IDB_CLASSES
,
ORACLE_CLASSES
, and
POSTGRE_CLASSES
must be updated.
Another way to place an additional
.jar
in the classpath of your JOnAS server is to insert it at the
end of the
config_env
file:
Содержание 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: ......