Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jaxb-dev] JAXBContext load issue in 2.3

Hi all, 
After upgrading to jaxb-runtime 2.3, there is a new created provider file /META-INF/services/javax.xml.bind.JAXBContextFactory 
to load and create JAXBContext implementation, and this provider file doesn't exist in  jaxb-runtime-2.2 .  JAXB 2.3 api/spec follows this order to discover the service implementation:
 1. Provider of javax.xml.bind.JAXBContextFactory is loaded using the service-provider loading facilities, as defined by Java SE Platform, to attempt to locate and load an implementation of the service. 
2 . Look for resource /META-INF/services/javax.xml.bind.JAXBContext. If such a resource exists, its content is assumed to be the provider factory class.

As a consequence of this order,  The JAXBContex from jaxb-runtime 2.3 will be always loaded if there is jaxb-runtime 2.3.3 under container-server/lib and jaxb-runtime 2.2.7 packaged in user's war lib.  Should we fix this load order issue to make it try /META-INF/services/javax.xml.bind.JAXBContext first ?

Thanks,
Jim

Back to the top