Access Metadata at Runtime

WARNING - TOPIC NOT WRITTEN - TOPIC ID: 3455

This topic has not yet been written. The content below is from the topic description.
You can access metadata through the org.jboss.aop.Advised interface through the _getAdvisor() or _getInstanceAdvisor() methods, or you can use the indirection that the Invocation object provides you. You can use the Invocation object to resolve metadata based on the context of the execution. BillingInterceptor.java gives an example of this. This interceptor intercepts different kinds of things (methods and constructors), but it doesn't care about the thing it is intercepting, only the metadata. public Object invoke(Invocation invocation) throws Throwable { System.out.println("billing amount: $" + invocation.getMetaData("Billable", "amount")); }