[jboss-user] [JBoss AOP] - Re: How to have test-aop.xml.I dont want to write the test
do-not-reply at jboss.com
Wed Aug 15 14:27:52 EDT 2007
"flavia.rainone at jboss.com" wrote : Hi!
| I can think of two alternatives for your problem.
| One of them is to write your xml file with whatever name you want (like test-aop.xml) and configure the property jboss.aop.path. This property should point to a classpath where this file is present. That way, JBoss AOP will detect and load your test-aop.xml file only when this property is enabled.
| Another approach would be more elegant, however, if you have aspects that are exclusive to your test mode. This second approach consists of putting those aspects in a directory or jar file, and adding a META-INF/jboss-aop.xml file to this dir or jar file. In this xml file, you put all the bindings and other configuration that must be enabled for test mode. To make JBoss AOP detect your jar (or directory) and its xml file, you just need to add it to classpath. When you want to run your application in normal mode, run it without this jar/directory in the classpath.
In the second alternative: I have my ear in deploy dirctory (with embeded *.aop). To extend it with testing interceptors, I can add a jar including all new interceptors + new jboss-aop.xml under /deploy (or /lib - is it the same as adding to classpath you are refering to ?!) directory and upon deployment of my ear it should be instrumented with all old and testing aspects. Is that correct?
If yes, what is the best way to add dependency of testing jar to my ear before start of instrumentation?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074544#4074544
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074544
More information about the jboss-user