Community
Participate
Working Groups
Assume the following bindings file <xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"> <xml-schema-types> <xml-schema-type name="int" type="java.math.BigDecimal" /> </xml-schema-types> <xml-java-type-adapters> <xml-java-type-adapter value="testing.MyCalendarAdapter" type="testing.MyCalendar"/> </xml-java-type-adapters> </xml-bindings> If Employee has an Address and both Employee and Address should make use of the xml-schema-type and xml-java-type-adapter specified if we create the context like below then everything works fine Class[] classes = new Class[]{Employee.class, Address.class}; JAXBContext ctx = JAXBContextFactory.createContext(classes, getProperties()); If the context is created without Address set then the xml-schema-type and xml-java-type-adapter are not used with it. ie: Class[] classes = new Class[]{Employee.class}; JAXBContext ctx = JAXBContextFactory.createContext(classes, getProperties());
Created attachment 194711 [details] Proposed changes and test
Modifications to store the package level adapters during processing so they can be accessed later when processing the extra types that weren't part of the original classes array.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink