[jboss-dev-forums] [Design of POJO Server] - Re: Behavior with AbstractKernelController

anil.saldhana@jboss.com do-not-reply at jboss.com
Wed Aug 23 10:51:54 EDT 2006


Adran says:

  | The behaviour is not "inconsistent".
  | In fact, it is more consistent now.
  | 
  | In the past, invoking "start" never actually guaranteed the service started. It would only actually do the
  | start() if all the dependencies were satisfied.
  | Later you might actually get the start when the correct dependency is added.
  | 
  | In fact, the code you show didn't even work properly until less than 2 years ago when I made it redirect through the service controller (under the hood in ServiceMBeanSupport).
  | 
  | Now with the introduction of the MC,
  | everything is done consistently.
  | 
  | Your code should be (and always should have been if you want things to work properly)
  | 
  | ServiceController.start(ObjectName);
  | 
  | followed by
  | 
  | ServiceController.getServiceContext(ObjectName)
  | 
  | to check what state it is actually in,
  | i.e. dependencies satisfied, the error/problem, etc.
  | 
  | See the deployment tests, that I wrote when I was fixing all this a while ago, if you want to see the correct pattern in more detail.
  | 

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

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



More information about the jboss-dev-forums mailing list