Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Examples/JPA/Monitoring

< EclipseLink‎ | Examples‎ | JPA
Revision as of 12:36, 26 January 2011 by James.sutherland.oracle.com (Talk | contribs) (New page: Monitoring EclipseLink supports a profiling and monitoring API through its [http://www.eclipse.org/eclipselink/api/2.2/org/eclipse/persistence/session...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


EclipseLink supports a profiling and monitoring API through its SessionProfiler interface. This interface gives events that allows a profiler or monitoring service to record performance or metrics on the EclipseLink application.

As of EclipseLink 2.2 a PerformanceMonitor is provided to collect performance an metric information. When enabled the PerformanceMonitor will log the monitoring information at set intervals, allowing an application's performance to be analyzed.

Previous to EclipseLink 2.2, a PerformanceProfiler was provided, but it did not make use of the complete SessionProfiler API, and was only useful for profiling a single use case, not a multi-user server. A QueryMonitor was also provided that provided simple monitoring information on queries, but no detailed information.

The PerformanceMonitor is enabled through the "eclipselink.profiler" persistence unit property in the persistence.xml file.

Persistence unit property

<property name="eclipselink.profiler" value="PerformanceMonitor"/>

Monitoring Levels

Level Description
OFF This setting disables the generation of the log output. You may want to set logging to OFF during production to avoid the overhead of logging.
SEVERE This level enables reporting of failure cases only. Usually, if the failure occurs, the application stops.
WARNING This level enables logging of issues that have a potential to cause problems. For example, a setting that is picked by the application and not by the user.
INFO This level enables the standard output. The contents of this output is very limited. It is the default logging level if a logging level is not set.
CONFIG This level enables logging of such configuration details as your database login information and some metadata information. You may want to use the CONFIG log level at deployment time.
FINE This level enables logging of the first level of the debugging information and SQL. You may want to use this log level during debugging and testing, but not at production.
FINER This level enables logging of more debugging information than the FINE setting. For example, the transaction information is logged at this level. You may want to use this log level during debugging and testing, but not at production.
FINEST This level enables logging of more debugging information than the FINER setting, such as a very detailed information about certain features (for example, sequencing). You may want to use this log level during debugging and testing, but not at production.
ALL This level currently logs at the same level as FINEST.

Back to the top