2 Replies Latest reply on Nov 16, 2012 11:25 AM by dzcs

    Extensions, Subsystem and their Dependencies

    dzcs

      Hi guys,

       

      I am developing new extension for Jboss 7.1.1.Final for project needs and actually, thanx to people who did the documentation and archetype, I am pretty done. One thing which is not disclosed in documentation and which I cannot find anywhere is how to define dependencies in my subsystem or extension -  practically how to say jboss, that my extension depends on other subsystems.

       

      In my example I get datasource name and topic configured for my subsystem as simple string attributes (can be I had to use something else - dunno - so far string). But how can I ensure, that "datasources" and "messaging" subsystems are started and have already deployed their stuff  (datasources and topics) before start of my subsystem is called?


      As I said this topic is not documented well and unfortunatelly I could not find much info on it. Javadoc is also mostly absent.

       

      Many thanks for your help in advance.

       

      Dmitri

        • 1. Re: Extensions, Subsystem and their Dependencies
          dzcs

          Hi together,

           

          I have found already how can I define dependencies:

          in SubsystemAdd for example in method performBoottime(OperationContext context, .....)

          ....

          context.getServiceTarget().addService([service-name], [service-instance]).addDependencies( [dependencies])

           

          where dependencies is array of service names.

          So what I am missing right now are service names for data sourceces, for jndi, hornet jms

          Can anybody help me?

           

          Thanks in advance.

          • 2. Re: Extensions, Subsystem and their Dependencies
            dzcs

            If somebody really needs he will find. Same with me. I have found the very simple way to find out needed service names.

            Just start jconsole find MBean jboss.as/service-container and execute dumpServices method. Thats it.