Using Cmp2.0/Jorm; Connectionmanager Configuration; Tracing Sql Requests Through P6Spy - Red Hat APPLICATION SERVER - JONAS Manual

Jonas
Hide thumbs Also See for APPLICATION SERVER - JONAS:
Table of Contents

Advertisement

278

40.2. Using CMP2.0/JORM

For implementing the EJB 2.0 persistence (CMP2.0), JOnAS relies on the JORM framework (see
http://www.objectweb.org/jorm/index.html). JORM must adapt its object-relational mapping to the
underlying database, and makes use of adapters called "mappers" for this purpose. Thus, for each type
of database (and more precisely for each JDBC driver), the corresponding mapper must be specified in
the
file of the deployed RAR. The
jonas-ra.xml
The JORM database mapper that has the property name
rdb: generic mapper (JDBC standard driver ...)
rdb.postgres: mapper for PostgreSQL
rdb.oracle8: mapper for Oracle 8 and lesser versions
rdb.oracle: mapper for Oracle 9
rdb.mckoi: mapper for McKoi Db
rdb.mysql: mapper for MySQL
Refer to the JORM documentation for a complete updated list.
40.3. ConnectionManager Configuration
Each RAR uses a connection manager that can be configured via the additional properties described in
the following table. The
settings all have default values and they are not required.
Property name
pool-init
pool-min
pool-max
pool-max-age
pstmt-max
Table 40-1. pool-params elements
Property name
jdbc-check-level
jdbc-test-statement
Table 40-2. jdbc-conn-params elements
jdbc-test-statement is not used when jdbc-check-level is equal to 0 or 1.

40.4. Tracing SQL Requests through P6Spy

The P6Spy tool is integrated into JOnAS and it provides an easy way to trace the SQL requests sent
to the database.
Postgres1.jonas-ra.xml
Description
Initial number of connections
Minimum number of connections
Maximum number of connections
Number of milliseconds to keep the connection
Maximum number of PreparedStatements cached per
connection
Description
JDBC connection checking level
test statement
Chapter 40. Configuring JDBC Resource Adapters
element is provided for this purpose.
mapperName
mapperName
file provides an example of the settings. These
can have the following values:
Default Value
0
0
-1 (unlimited)
0 (unlimited)
10
Default Value
0 (no check)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Application server

Table of Contents