3 Replies Latest reply on Oct 7, 2004 12:32 PM by dimitris

    How do I keep a Jboss service in CREATED state during deploy

    yurifyurif

      I want to configure jboss service in such a way that when it's deployed it would remain in CREATED state until some other service makes it transition into STARTED state later on. Is there a way to specify this in jboss-service.xml or in any other config file? Is this a bad idea in general?
      Thanks,
      Yuri

        • 1. Re: How do I keep a Jboss service in CREATED state during de
          dimitris

          That's what service dependencies are all about.

          E.g.:

          <server>
          
           <mbean code="XXX" name="mydomain:name=mbean1">
           <depends>mydomain:name=mbean2</depends>
           </mbean>
          
           <mbean code="YYY" name="mydomain:name=mbean2"/>
          
          </server>
          


          Regards
          /Dimitris

          • 2. Re: How do I keep a Jboss service in CREATED state during de
            yurifyurif

            My question was not about service dependencies. I want a particular service to stay in CREATED state for a long time after the deployment is finished. At some point in time later (which is determined by an external event) it will be started. Essentially I'm talking about ability to pre-create a service abd start it on demand, not during the deployment. Thanks

            • 3. Re: How do I keep a Jboss service in CREATED state during de
              dimitris

              JBoss currenlty has no notion of deploying a service in stopped mode.

              A possible hack is to not override the start() method, e.g. write a start2() then decide in your code when this other method should be called, e.g. upon reception of a particular JMX notification.

              The only problem is that jboss will not have a correct view of the status of your that will be reported as STARTED nevertheless, even if start() is missing.