0 Replies Latest reply on Jul 26, 2013 9:28 AM by ansur

    Exposing model through extension

    ansur Newbie

      So I've been able to already add a JBoss extension which scans for EJBs with a custom annotation, during deploy time (thanks to the great help on this forum!).


      The next step would be to expose that information through the management model.

      The model would look somewhat like:

      • deployment-1.ear
        • SomeAnnotatedEJB
          • Attribute1
          • Attribute2
        • SomeOtherAnnotatedEJB
          • Attribute1
          • Attribute2
          • BitMoreComplexAttribute
            • SubItem1
            • SubItem2
      • deployment-2.ear
        • YetAnotherAnnotatedEJB
          • Attribute1
          • Attribute2
          • OptionalAttribute

      ... etc

      Quite similar to some models that I've already seen in JBoss itself.


      It's a rather static model, in that only during deployment or undeployment, the model changes. Nothing changes at runtime.


      So what I'm still missing in terms of information, is how to get from my DeploymentUnitProcessor (which is already discovering the required EJBs) to exposing that. For now I made a POJO containing all information, and these POJOs are kept withing a org.jboss.msc.service.Service.

      Do I register/keep it somewhere as a ModelNode, or is it by registering a certain Operation where I would need to translate from my Object into the ModelNode?



      This is on Jboss 7.2.0