JBoss Community

JBoss extention doesn't find custom annotation

created by ansur in JBoss AS 7 Development - View the full discussion

I'm building a JBoss extension which aims to detect a custom annotation being placed on an EJB implementation class. So the annotation is placed on the same level as @Singleton, @Stateless etc.

 

My DeploymentUnitProcessor can detect the EJBs, but when I load the class like this:

 

return moduleClassLoader.loadClass(viewDescription.getComponentDescription().getComponentClassName());

 

... I do get the Class object, but it only shows the EJB annotation (e.g. @Singleton) being present, not my custom one.

Obviously the RetentionPolicy is Runtime.

 

Is this due to the fact that whatever JBoss module is inspecting the class, doesn't have a notion of my custom Annotation?

And if this is so, which module is this, and could I register a dependency to the module containing my annotation at runtime?

Reply to this message by going to Community

Start a new discussion in JBoss AS 7 Development at Community