Yet another cool package that I don’t have time to look at. I need a job as a professional open source package evaluator. That would be cool. This one is P6Spy. From the PR on their website:
P6Spy is an open source framework for applications that intercept and optionally modify database statements. The P6Spy distribution includes the following modules:
- P6Log. P6Log intercepts and logs the database statements of any application that uses JDBC. This application is particularly useful for developers to monitor the SQL statements produced by EJB servers, enabling the developer to write code that achieves maximum efficiency on the server. P6Spy is designed to be installed in minutes and requires no code changes.
- P6Outage. P6Outage detects long-running statements that may be indicative of a database outage proble and will log any statement that surpasses the configurable time boundary during its execution. P6Outage was designed to minimize any logging performance penalty by logging only long running statements.
Having spent a fair amount of time patching the standard MySQL driver to give us the ability to have it also send information via message queues, I wish I knew about this a few months ago. This could be used to do the same thing, intercept the SQL and send it via an alternate route. Theoretically, it could be used for replication, monitoring, and other fun uses.