Question about component management in Excalibur:
When I need to do dynamic class loading with
classloader.loadClass(className).newInstance(), should I do this with my
code or should I just use ComponentManager for this also? What is the "best
practice"?

FYI, I'm trying to find the best way to implement
org.apache.avalon.excalibur.i18n.DefaultBundleFactory (in scratchpad).
Right now it does it like this:

Thread.currentThread().getContextClassLoader().loadClass(bundleClassName).ne
wInstance();
And then manages the lifecycle methods...
However, I would like Excalibur to take care of that and the lifecycle
methods. Is it ok, if I just require the user to declare all the different
bundle implementations and then ask for instances from
ExcaliburComponentSelector? Or is it a bit of abusing the
ExcaliburComponentSelector, if I use it like this (as a factory)?

Rgds,
Neeme


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to