Skip Headers
Oracle® Containers for J2EE Enterprise JavaBeans Developer's Guide
10g (

Part Number E13981-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Index
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

Configuring EJB Logging

OC4J uses the standard JDK java.util.logging package and, by default, writes log messages to the <OC4J_HOME>/j2ee/home/log/<group>/oc4j/log.xml file.

This section describes the following:

Logging Namespaces

You can configure loggers for the following java.util.logging namespaces:

  • oracle.j2ee.ejb.annotation

  • oracle.j2ee.ejb.compilation

  • oracle.j2ee.ejb.database

  • oracle.j2ee.ejb.deployment

  • oracle.j2ee.ejb.lifecycle

  • oracle.j2ee.ejb.pooling

  • oracle.j2ee.ejb.runtime

  • oracle.j2ee.ejb.transaction

Logging Levels

You can configure the following log levels: FINER, FINE, CONFIG, INFO, WARNING, and SEVERE.

Configuring Logging With Application Server Control Logging MBean

The simplest way to configure OC4J logging is to use Application Server Control (see "Using Oracle Enterprise Manager 10g Application Server Control").

Application Server Control shows all EJB-related logger names, and you can specify attributes such as log level using the Application Server Control interface.

Configuring Logging Using the j2ee-logging.xml File

You can configure OC4J logging using the <OC4J_HOME>/j2ee/home/config/j2ee-logging.xml file, as Example 31-1 shows.

Example 31-1 j2ee-logging.xml File

    <handler name='oc4j-handler'/>
    <handler name='console-handler'/>

For more information, see the following:

Configuring Logging Using System Properties

You can configure OC4J logging using the oracle.j2ee.logging system property. This system property has the following format:



  • <log-level> is one of fine, finer, or finest.

  • <log-namspace> is an oracle.j2ee.ejb namespace (see "Logging Namespaces").

Example 31-2 shows how to configure the logger for the oracle.j2ee.ejb.deployment namespace to finest.

Example 31-2 Configuring a Logger with a System Property


Configuring TopLink Logging

For EJB 3.0 JPA applications, you can use vendor extensions to customize how the TopLink JPA persistence provider logs.

For more information, see "TopLink JPA Extensions for Logging".

Configuring Oracle JMS Connector Logging

For applications that use the Oracle JMS Connector to access a JMS message service, you can customize how the Oracle JMS Connector logs using activation configuration property LogLevel.

For more information, see "Configuring an EJB 3.0 MDB to Access a Message Service Provider Using J2CA".