Title: RE: CVS update: src/org/mmbase/module/core

> #6115  MMBase.getMMBase() does not garantee MMBase is started.
> Now explicitly starts MMBase
>
<< If I remeber this corretely we did no do this because the bridge was not
allowed to start mmbase
does this "patch" change this behaviour ? >>

Not really, no.
If you call MMBase.getMMBase() when there are no modules started, it will still start MMBase.
This is because the first time getModule() is called, it will load ALL the modules, and then start them in the order loaded. The scond time the getModuel(0 method is called, it will skip laoding (and starting) modules, instead getting the module from the collection it has and returning it.

Now, if the getModule() method is called from the init() of a module, any moduels that are initialized AFTER that module will not (yet) been started. So, in the old situation, it is possible for MMBase.getMMBase() to return an unintialized module (so no builder present etc.).

Passing the true parameter ensures that the getModule() method checks whether the module it returns has been started, and if not, it starts it before returning it (starting it with higher priority).

You can still not start MMBase from the bridge, as there will be no configuration info (servletcontext or config path) present.

Pierre

Reply via email to