David,
 
  We are miscommunicating.

        

        >In all the mbeans I have written and seen in jboss, aside from
        >egregious bugs, if setting an attribute doesn't have an immediate
        >effect, it does have the desired effect if you run through the service
        >lifecycle (usually stop, start, occasionally stop, destroy, create,
        >start).  My view is that mbeans in jboss can take advantage of the
        >service lifecycle.  If you don't want to, make all your attribute
        >changes have their effects immediately.  All our mbeans are pretty much
        >jboss specific and most heavily use the service lifecycle.  They just
        >won't run without it.  I still think it is a really convenient
        >extension to vanilla jmx and don't see why we should replace it.
         
         
        I barely know what the service lifecycle is.  I have not used it.  I am not 
arguing to replace it.  I never said that.  You said that.  
         
        How do I set an attribute correctly, step by step, for a Bean that uses the 
service lifecycle?
         
        It helps me to use a state metaphor when considering lifecycle issues.  It 
sounds like there are several states a lifecycle-oriented bean can be in: destroyed, 
created, running.  In which state is it safe to set RW attributes on 
lifecycle-oriented beans?
         
        Is the following the appropriate way to set values on a lifecycle-oriented 
bean (pseudo-code)?
         
        if(bean.isLifecycleOriented())
        {
          if(bean.isRunning())
          {
            bean.stop();
          }
          bean.setAttribute(newValue); 
          bean.start();
        }
         
        I'm here to learn :)
         
          - Matt
         
         
         
         
         
         
         


         

NHSDM隊X'uxZ+'+ح >.)j+Ԩax6I硶
0(~(^hgf)+-%,ׯzZ)+-.ǟalb,y+޷b?+-w6^hg


Reply via email to