John; The wrapper will not change your application code. You are simply adding a new DataSource. So if your old DataSource was DsA, then you could rename it DsB and call your wrapper DsA.
Current Application -------> DsA (DataSource) Possible Application -------> DsA (Wrapper) --------> DsB (DataSource) As far as being able to selectively implement the tracing call, that would require a more sophisticated interceptor structure, I suppose. I am not sure that there is an efficient way to determine the exact method or class a request came from (without modifying the application code), except possibly to build a stack trace (by contriving an exception or something) and back-walking the stack elements. I am not sure how efficient that would by, but some nifty grepping might get you the runtime information you need to figure out if the tracing should be enabled or not. You may also want to consider using P6. It is a wrapper around JDBC drivers that will give you a detailed log of all the SQL executed against a DataSource. It is independent of app server and persistence architecture (and its free.....). Here is some sample output I found in our logs: | 00:09:41,967 INFO [TP-Processor8] [p6spy] - 1073797781967|0|3454|statement|| Select <Some Secret SQL Here> You can download p6Spy at http://www.p6spy.com/. Good luck. //Nicholas View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839457#3839457 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839457 ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user