In our app, we have multiple 'layers' of spring application contexts - I.E: each has a parent of the layer below. This way the databases are defined at a low level, then business beans, then web.
Now, I can create a <bt:manager> at the database level… but this only tracks jdbc calls. Or I can create managers at each level - but then I loose the tracing context of the calls.
Is there a way to configure it to have one bt:manager, but the advice applied to the other layers too?
As long as your <bt:manager> definition is at the deepest level, you should be fine. That's assuming that your lower-level ApplicationContexts are parents of your higher-level ApplicationContexts - it sounds like they are.
You should be able to use the <bt:advice> configuration tag in your child contexts to refer to a higher-level <bt:manager> tag. You can then refer to bt:advice in AOP conifguration, similar to spring's <tx:advice>:
<aop:advisor advice-ref="btAdvice" pointcut-ref="trackedOperations"/>
You can also use the <bt:http-requests/> element in the same way. It looks like we're missing some documentation on that… I'll log an issue. E.g.
<bt:http-requests tracking-manager="myManager" ... />
This sort of configuration has not been extensively tested, but it should work. What version of Spring are you using?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.