> You are right to be concerned. Basically, the configurators don't know
> about subclasses of Category by default.
Do they need to know that ? Since all categories are instantiated
from CategoryFactory, configurators might only need to make the
factory work well.
> In the cases where I
> have an instance like catx, I must ensure that a creation is done before
> the configuration.
If I instantiate the category before configuration and I set
properties of this category(like appenders attached) in the
configuration file, does this category instance will get those
properties after invoking configuration ?
> It shouldn't have to be like this. Already the Property
configurator lets
> you determine the factory used but does not let you set attributes
on the
> factory.
Does this means If I don't need to specify attributes on the
factory(ie, all attributes are like hostname, which can be created on
the fly), and I set the factory in the Properties file, then I can
let the configurator to instantiate a AppServerCategory object ?
> I hear you can also set the attributes through with the DOM
configurator.
It sounds like DOMConfigurator doesn't have the problem of
PropertyConfigurator. Can I use DOMConfigurator as a complete
solution ? However, I find no "CategoryFactory" stuff in
DOMConfigurator.java and the dtd file.
> You mentioned subclassing the PropertyConfigurator. That has some
> interesting possibilities. The quick approach would be to merely
override
> the configureCategoryFactory method in a way that anticipates the
kind of
> properties the subclass provides. A longer approach would be to use
> reflection for populating arbitrary attributes. Then anyone
creating their
> own subclass could use it.
Thank you for pointing out how to do that. I might try it after all
attemps fail.
I must say sorry for bringing so many quesitons to bother you guys.
I did look at the code, but can't make sure what I understood is
correct.
Thank you again,
Jin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]