> I need to get a reference to the MMBase object in order to register a
> listener for the caching stuff, but I can't seem to find the right
> method. I cannot find a single "new MMBase" in the entire source, and
> the getMMBase method below doesn't exist yet (or not anymore :) ) in
> the 1.5.1 release (and I like to stick to release versions).
>
> Can I create a new MMBase object, or is there supposed to be only one
> MMBase object in the JVM at the time?
You need a reference to the MMBase object that is created at startup. It
is created using a construction like
Class.forName(classname).newInstance(), that's why you don't find "new
MMBase" anywhere in the code.
As far as I know, the static MMBase method getMMBase() should be present
in release 1.5.1, but at any rate this is all it does:
return (MMBase) getModule("mmbaseroot");
Here, getModule() is a method of Module.
Rob van Maris
Developer
Finalist IT Group
Java Specialists
-------------------------------------------------------------
Amsterdam, The Netherlands
Office: +31 20 5962321 (Direct)
Mobile: +31 651444006
Fax: +31 20 5962331
-------------------------------------------------------------