I can answer part 2
- If OSGi is using custom class loaders and JAXB is using different class loaders, will JAXB ever work in OSGi?

Yes it will and it does - we did it some time ago and it worked fine (as per my earlier post)

In fact, I seem now to recall that JAX-B only actually has a very small set of runtime classes - from memory mostly it's a build-time, generation tool. The Java classes it creates are mostly standalone with needs largely on things like XML parsers. I seem to remember some namespace handling and RI classes, and that was about it. So it's mostly about bundling your generated classes in a correct with all the necessary imports and exports.

-- Rob
Thanks,
 Tim

Felix Meschberger wrote:
Hi,

On 3/19/07, Tim Moloney <[EMAIL PROTECTED]> wrote:
I've not worked with class loaders before.  How do I know which class
loaders are being used?  Where can I read more about them?

Well, you "work with class loaders" all the time, but you don't know.
In fact, the whole OSGi Module spec is centered around Java
ClassLoading. :-)

You will find numerous documentation on class loading on the net, e.g.
http://www.javalobby.org/java/forums/t18345.html
http://www.onjava.com/pub/a/onjava/2005/01/26/classloading.html

Point here is, that two Class instances loaded by different
ClassLoader instances are not the same even thought their byte code
might be exactly the same. And this is one of the tricky things
regarding class loaders because this situation is somewhat difficult
to trace.

I'm not sure that the source for JAXB is available but I'll look.

Thanks for the suggestions.  :)

You are welcome.

Regards
Felix



--


Ascert - Taking systems to the Edge
[EMAIL PROTECTED]
+44 (0)20 7488 3470
www.ascert.com

Reply via email to