It might be possible to get "independent" behavior even with several
copies of a compiled schema if we construct a SchemaTypeLoader union in
the right order, being sure to put the compiled schemas we want to use
first before the ones from a parent classloader.
david jencks
On Saturday, February 21, 2004, at 06:25 AM, Aaron Mulder wrote:
Jeremy,
Do you think there's some way to tell XMLBeans to load a document,
and let the only references to that schema type be assigned to the
loaded
elements? In other words, the XMLBeans infrastructure should "load and
forget"? If so, you still have to expect, in the general case, that
the
tool won't do it this way, so it will have to be "load (ignoring any
other
schema type that might be in memory), then forget".
FYI, I was loading the server plugin in a child classloader of the
tool. I can change it around a bit so that the tool and server are
both
children of a common root (which holds only the libs and startup
class).
Aaron
On Sat, 21 Feb 2004, Jeremy Boynes wrote:
We cannot assume that the tool will have done this and need to find a
solution that means the plugin works even if it is loaded in the same
classloader as other xmlbeans.
David Jencks wrote:
How is the classloading of the .xsb schema type system set up? From
your description I would guess that the tool loads its version of
the
j2ee schema types using one classloader, then loads the geronimo
dconfigbeans using a child classloader or the same classloader.
I think if you wish to write a tool using xmlbeans you need to ensure
that the tools schema type system is loaded by a classloader
inaccessible to any plugins classloader. The copy of xmlbeans
should be
sharable, just not the binary schema .xsb files.
Does this make sense?