![Red Hat Application Server Скачать руководство пользователя страница 26](http://html.mh-extra.com/html/red-hat/application-server/application-server_manual_1427406026.webp)
18
Chapter 2. Getting Started with JOnAS
•
Section 2.2.2.1
Configuring Database Access
•
Section 2.2.2.2
Creating the Table in the Database
•
Section 2.2.2.3
Configuring the Classpath
2.2.2.1. Configuring Database Access
In order to be able to access your relational database, JOnAS will create and use a DataSource object
that must be configured according to the database that will be used.
These DataSource objects are configured via properties files.
$JONAS_ROOT/conf
contains templates
for configuring DataSource objects for databases such as Oracle and PostgreSQL:
•
$JONAS_BASE/conf/Oracle1.properties
•
$JONAS_BASE/conf/PostgreSQL1.properties
Depending on your database, you can customize one of these files with values appropriate for your
installation. After doing so, you must update the property
jonas.service.dbm.datasources
in
the
jonas.properties
file.
For example, for the
Oracle1.properties
file.
jonas.service.dbm.datasources
Oracle1
Section 3.5.7
Configuring the Database Service
provides more details about DataSource objects and
their configuration.
2.2.2.2. Creating the Table in the Database
The
$JONAS_ROOT/examples/src/eb
directory contains an SQL script for Oracle:
Account.sql
($JONAS_ROOT/examples/src/eb/Account.sql). If your Oracle server is running and you are using
CMP 1.1, you can create the table used by the example. If you are using CMP 2.0, do not create the
table.
2.2.2.2.1. Example: Creating the Table in Oracle
sqlplus user/passwd
SQL
@Account.sql
SQL
quit
2.2.2.3. Configuring the Classpath
The JDBC driver classes must be accessible from the classpath. To enable that, update the
config_env
file (http://jonas.objectweb.org/current/bin/unix/config_env).
In this file, set one of the following variables: IDB_CLASSES, ORACLE_CLASSES, or POST-
GRE_CLASSES with the appropriate value for your database installation.
Содержание 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: ......