geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: XMLBeans for DDs
Date Sat, 21 Feb 2004 08:09:44 GMT
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?

BTW, I was thinking some more about the requirement that the plugin 
supply xpaths including the prefixes representing the namespaces used 
by the j2ee dd.  There might be an additional problem there beyond the 
peculiar requirement that the root / ddbean report on the attributes of 
the actual first element.  I haven't studied the namespace spec 
closely, but it seems to me that it might be possible to label each 
element in an instance document with a  different prefix for the same 
namespace.  This would make it impossible to figure out what xpath to 
supply to get to any particular element.

<n1:parent xmlns:n1="myuri">
   <n2:child xmlns:n2="myuri"/>
   <n3:child xmlns:n3="myuri"/>

Is this legal xml?  What xpath can you use to find the chlid elements?

david jencks
On Friday, February 20, 2004, at 09:41 PM, Aaron Mulder wrote:

> 	So I'm trying to run a JSR-88 tool that uses XMLBeans for the J2EE
> DDs against the Geronimo (connector) JSR-88 plugin that also uses 
> XMLBeans
> for the J2EE namespace.  Problem is, the tool doesn't use the same 
> package
> names that the Geronimo plugin does.  And apparently there's some 
> static
> mapping from namespaces to object classes in XMLBeans, because when the
> Geronimo code tries to load a J2EE String, it gets the tool's J2EE 
> String
> class instead of the Geronimo J2EE String class and gets a
> ClassCastException.
> 	It's possible to construct the tool such that there's a separate
> XMLBeans instance loaded for each of the server plugin and the tool 
> code
> with some ClassLoader magic.
> 	It would also be possible to make sure the Geronimo DDs don't use
> or extend any classes from the J2EE namespace (for example, there's
> probably no reason why the field in question couldn't be an XSD String
> instead of a J2EE String).
> 	It might also be possible to work around this in XMLBeans somehow.
> 	Any preferences or suggestions?
> Aaron

View raw message