On Jul 17, 2006, at 11:04 AM, Kenneth Tam wrote:
Jeremy, can you elaborate a bit on
SystemCompositeComponent.registerJavaObject()? The call to register
the RuntimeInfo in Launcher is the only non-test call I can find, and
the doc suggests that it's sort of a shorthand for what the builder
code might do.
Normally, the builder creates and registers a Component into the
component tree. When the Component is started or stopped then the
implementation is activated (e.g. some Java Object may be created).
However, there are some (but few) occasions where you may already
have an Object that you want to make available as a service. This API
lets you wrap such an Object in an Component an add it in.
It's really designed for the bootstrap phase were the bootstrapper
may have created some Objects to boot the runtime and it now wants to
make them available. That's what I'm doing here to get the
RuntimeInfo into the runtime before the builders have been created
(so that they can use it if necessary).
While I'm asking about the Launcher: Can someone elaborate on the
semantics of the spi.Lifecycle and the behaviour implemented by
AbstractLifecycle, esp wrt deployment? For example, what would be the
the differences between the order of start() statements currently in
Launcher.bootRuntime():
// create runtime
runtime.start();
// deploy "composite" into runtime
composite.start();
and:
// create runtime
// deploy "composite" into runtime
runtime.start(); // shouldn't this also start the composite
deployed into it?
Yes, the two should be equivalent. They may not be due to problems
with how the DefaultRuntime is implemented but that would be a bug.
IIRC if you register a composite as a child of another running
composite then the child is immediately started. I think this is a
problem - you should be able to register a child and leave it
unstarted (starting it later with a call to start()).
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]