Costin Manolache wrote:
I didn't know this - how does it find the defaults ? I'm not talking only
about
default values of a property, but also in the object hierarchy, tomcat
creates a lot
of components by default, if you don't specify a manager or logger, a
default one
will be created. Seems pretty specific to tomcat - can't see how
XMLEncoder
would
guess that.
It can't guess. For each object that is being encoded it has to be able
to create another from scratch and then it basically diffs the two and
writes the differences.
Sorry for the poor explanation -- it's all I have time for at the
moment. It's probably possible to arrange things such that XMLEncoder
would capture some level of hierarchy aspects as differences and
defaults, but I'm not sure how workable this would be.
[I have a top-level MBean that keeps a list of top-level entities
(primarily other MBeans) that then are delegated to for everything below
that point, so the defaulting stuff only occurs below the top-level in
my case -- and the hierarchy below that point is empty by default...]
--
Jess Holle
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]