[jboss-dev-forums] [JBoss Microcontainer Development] - Re: Optimizing ControllerState

kabir.khan@jboss.com do-not-reply at jboss.com
Fri Oct 30 13:23:33 EDT 2009


https://jira.jboss.org/jira/browse/JBKERNEL-59
"alesj" wrote : 
  | Actually they are reported, see AbstractController::getContext
  | 
  |   |          ControllerContext result = getRegisteredControllerContext(name, false);
  |   |          if (result != null && state != null && isBeforeState(result.getState(), state))
  |   |          {
  |   |             return null;
  |   |          }
  |   | 
  | 
I updated the javadoc of Controller.getContext(Object, ControllerState) to show what is actually happening:

  |    /**
  |     * Get a context that has reached at least the passed in state
  |     *
  |     * @param name the name of the component
  |     * @param state the state (pass null for any state)
  |     * @return the context
  |     */
  | 

"alesj" wrote : 
  | But AbstractKernelController::getContext could be fixed to apply this the same way.
  | 
I modified it to look for kernel registry entries is state >= INSTALLED and added StateAfterInstalledTestCase.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263217#4263217

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263217



More information about the jboss-dev-forums mailing list