This is a great feedback and explanation even if the AOP is not yet fully used as it should, especially AspectWerkz features:
- we support runtime weaving of Aspects. That means with some little fancy tool to make things easier to use you can set up pretty easily an on-demand profiling solution and we do guarantee that original bytecode will run (not even a boolean check) when advice/aspects are undeployed, without requiring an application downtime / redeployement.
- you should not use P6Spy since I think it does not support to wrap XA drivers. May be advising some key methods of driver classes that implement jdbc API using hierarchcal pattern is enough.