The P6Spy tool is integrated within JOnAS to provide a means for easily tracing the SQL requests that are sent to the database (see http://www.p6spy.com/).
To enable this tracing feature, perform the following configuration steps:
Set the datasource.classname property of your DataSource properties file to com.p6spy.engine.spy.P6SpyDriver
Set the realdriver property in the spy.properties file (located within $JONAS_BASE/conf) to the JDBC driver of your actual database
Verify that logger.org.objectweb.jonas.jdbc.sql.level is set to DEBUG in the $JONAS_BASE/conf/trace.properties file.
Example:
DataSource properties file contents:
datasource.name�������jdbc_3 datasource.url jdbc:postgresql://your_host:port/your_db datasource.classname��com.p6spy.engine.spy.P6SpyDriver datasource.username jonas datasource.password jonas datasource.mapper rdb.postgres |
Within the $JONAS_BASE/conf/spy.properties file:
realdriver=org.postgresql.Driver |
Within the $JONAS_BASE/conf/trace.properties file:
logger.org.objectweb.jonas.jdbc.sql.level DEBUG |