On 3/21/07, Tim Moloney <[EMAIL PROTECTED]> wrote:
- How do I determine which class loaders are loading which classes?
Theres is no API to get the classes loaded by a certain class loader, but you can (of course) call Class.getClassLoader() to get the loader of the class. E.g. someObject.getClass().getClassLoader().
- If OSGi is using custom class loaders and JAXB is using different class loaders, will JAXB ever work in OSGi?
They are not necessairily different. The problem ist that JAXB is probably using some mechanism to find a class loader to use to refer to mappings. I am not familiar how this is actually done (never worked with JAXB) but generally there is some API to tweak the class loader loader used. It might be some parameter, some environment setting, the current thread's context class loader or even the loader of the factory class itself... You might want to also read the XML Parser Service Specification in the OSGi compendium. This even has a section "702.6 Adapting a JAXP Parser to OSGi". This might provide more hints. Regards Felix