P6Spy is an open source framework for applications that intercept and optionally modify database statements.
To use an p6Spy driver with DODS application:
1. In the application configuration file set the following line:
DatabaseManager.DB.<database_id>.Connection.Url = "<RealDatabaseURL>"
where < confFilePath> is the full path to the database properties file, <database_id> is the database identifier used in the configuration file, and <RealDatabaseURL> is URL of your database (real database driver URL)
2. Set p6spy jdbc driver class in same file:
DatabaseManager.DB.<database_id>.JdbcDriver = "com.p6spy.engine.spy.P6SpyDriver"
3 Add the path to p6spy.jar to the setting for CLASSPATH in the application’s run script, in <appName>/run.
4. Edit
<DODS_HOME>/lib-ext/spy.properties
file, there are sample setings and additional informations, and put it in some folder in your application class path.
For more informations about p6spy there are a link where you can find all needed information and downloads.