3 Replies Latest reply on Nov 21, 2012 11:13 AM by Ed Roberts

    How can I determine when the ModelController service is fully started

    Ed Roberts Newbie

      I have an OSGi service that provides container properties (i.e. JBoss Model) to our other OSGi bundles.

       

      We moved to a late October build of 7.2.0.Alpha1 from 7.1.1.Final. With the move, the startup timing between the ModelController service and the OSGi deployments changed. 

      When my code queried the model before it was fully started, the Model Controller was returning a successful operation outcome, but the query would return an undefined value.

       

      With the latest build from github attribute queries prior to a started state now quite rightly return an unsuccessful operation outcome, and the following error is logged

      2012-11-15 15:35:39,436 ERROR [org.jboss.as.controller.management-operation](EclipseGeminiBlueprintExtenderThread-18) JBAS014613: Operation ("read-attribute") failed - address: ([("interface" => "internal")]) - failure description: "JBAS014807: Management resource '[(\"interface\" => \"internal\")]' not found"

       

      My question is, what can I test to make sure the Model and Service are fully started before querying, in order to avoid these errors being logged ?

       

      I tried using the controller state before, but it wasn't actually changing to indicate it had started.