On 2001.11.19 14:24:27 -0500 Bill Burke wrote:
> Does this mark a dependency?
> 


Yes.

Sequence of events:

mbean created

mbean configured, returning a list of mbean references from mbean-ref and
mbean-ref-list-element elements (the values must be object names)

ServiceController looks to see if all the referenced mbeans are started
yet.  If so, it starts (and remembers that it is started) the mbean.  If
not, it waits, and every time an mbean is started, checks to see if all the
dependencies are satisfied yet.  As soon as they are, the newly OK mbean is
started.

Essentially the reverse happens when you undeploy a referenced mbean.

Note that mbean-refs can correspond to ObjectName valued properties of the
referencing mbean, in which case they need a valid name attribute, or can
be anonymous, with no name attribute.  An example of the use of the latter
is in the DefaultDS mbean, which requires the hsqldb to be started, but has
no use for a direct mbean reference to it.  It uses an anonymous mbean-ref
to wait until the hsqldb is started.

I think its a good idea to use the ObjectNames you get from these
mbean-refs to perform operations on the referenced mbean, rather than e.g.
using a singleton with a static get method or binding in jndi and needing
also a jndi name.  I have sometimes implemented a getInstance method in the
mbean interface to return the actual object so you don't need every
operation and its brother in the mbean interface.  I'm not certain this is
the best design idea, but it sure was convenient;-).

David Jencks

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to