I have an EJB (JSR-109) that is annotated with @Timing (a custom annotation I 
created).  I have a pointcut bound to an interceptor that picks up all method 
invocations with that annotation.  All of this works great. However, I added a 
property to my annotation that I would like to read inside my interceptor.  
Here is my annotation:

@Target({ElementType.METHOD})
  | public @interface Timing {
  |     String type() default "[default]";    
  | }

Inside my interceptor's invoke method (which is automatically called) I tried:

public Object invoke(Invocation invocation) throws Throwable {
  |         String type = (String) invocation.getMetaData("Timing", "type");
  | ...
  |     

but the result of that call is null.  When I look at the invocation object in 
the debugger, the "metadata" is null.

How do I get my annotation information from within my interceptor?

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

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

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to