-
1. Re: Interceptor not intercepting
mriou May 2, 2004 2:53 PM (in response to mriou)Trying again to post the pointcut declaration :
<bind pointcut="all(@transactional)"> <interceptor class="org.smcp.twister.engine.common.aspect.TransactionInterceptor"/> </bind>
-
2. Re: Interceptor not intercepting
bill.burke May 2, 2004 7:03 PM (in response to mriou)Did you look at the metadata example that comes with JBoss AOP beta1? You have to run that generates another XML file. Then you must have that XML file and your binding in the jboss.aop.path System property.
If you change to have report="true" then you can get an XML dump of bindings and metadata attached. You can get the same thing graphically through the JBoss management console if you're running within JBoss.
Get back to me if you have more problems.
Bill -
3. Re: Interceptor not intercepting
mriou May 3, 2004 3:09 PM (in response to mriou)Sorry about that, metadata-aop.xml was not in jboss.aop.path. Absolutely my fault.
Thinking about it this property bothers me a bit as in most deployment you don't have a prior knowledge of the file system. Is there a way to make JBossAOP just look in the classpath (like loading it using a classLoader.getResourceAsStream()) ??
Thanks a lot. -
4. Re: Interceptor not intercepting
bill.burke May 3, 2004 4:03 PM (in response to mriou)Depends if you are running inside or outside the JBoss application server.
If outside, then JBoss AOP does this by default:
Enumeration enum = Thread.currentThread().getContextClassLoader().getResources("META-INF/jboss-aop.xml");
So any part of your classpath that has a META-INF/jboss-aop.xml file within it will be loaded by JBoss AOP. See the packaging tutorial example for more detail.
If you are running inside JBoss applications server, this "getResources" feature is turned off. Instead, you must put YOURFILE-aop.xml in the deploy directory, or create a jar named YOURJAR.aop and in the META-INF directory of the YOURJAR.aop jarfile put a jboss-aop.xml. Am I making sense? I will write a "Using within JBoss app server" example for the next release.
Regards,
Bill -
5. Re: Interceptor not intercepting
mriou May 6, 2004 3:11 PM (in response to mriou)I'm running outised the app server and my jboss-aop.xml is properly loaded from the META-INF directory but not the metadata-aop.xml. It seems that the metadata file only gets propery loaded using the jboss.aop.path, is that right ?
-
6. Re: Interceptor not intercepting
kabirkhan May 7, 2004 4:02 AM (in response to mriou)Hi there,
Been asked by Bill to let you know he is away giving training. He'll respond eventually, but not as quickly as normal.
Cheers,
Kab -
7. Re: Interceptor not intercepting
bill.burke May 9, 2004 11:22 AM (in response to mriou)Yes, that is correct, please see the packaging example though.