I think including class metadata in the chain is a good idea. The case I was looking at was similar to the following:
/** | * @@persistent pk=Id | */ | public POJO { | String Id; | String name; | /** | * @@persistent_getter | */ | public void getName() { | return name; | } | } | | public GetInterceptor implements Interceptor | { | public Object invoke(Invocation inv) throws Throwable { | String pkFieldName = inv.getMetaData("persistent", "pk"); | Object o = inv.targetObject; | Field f = o.getClass().getField(pkFieldName); | selectFromDatabase("select * from POJO where id = ?", f.get(o)); | // Set the results in the target object. | | return inv.invokeNext(); | } | } I would of thought that metadata could have similar semantics to variables with regard to scoping. Class metadata could be overridden by Method or invocation metadata. I realise it is still possible to get the class metadata from the advisor, but I am still confused as to why it isn't part of the chain. Is it merely a JSR-175 compliance thing (if so I'll stop my whining)? Mike. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3834039#3834039 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3834039 ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development