6 Replies Latest reply on Jul 26, 2013 2:06 AM by ansur

    JBoss extention doesn't find custom annotation

    ansur Newbie

      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?