[jboss-user] [JBoss AOP] - Re: How to have test-aop.xml.I dont want to write the test

flavia.rainone@jboss.com do-not-reply at jboss.com
Mon Jun 25 15:42:24 EDT 2007


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057473#4057473

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057473



More information about the jboss-user mailing list