public static DynamicJAXBContext createContextFromOXM(ClassLoader classLoader, Map<String, ?> properties) throws JAXBException {
if (properties == null || (properties.get(JAXBContextProperties.OXM_METADATA_SOURCE) == null && properties.get(JAXBContextFactory.ECLIPSELINK_OXM_XML_KEY) == null)) {
throw new JAXBException(org.eclipse.persistence.exceptions.JAXBException.oxmKeyNotFound());
}
return new DynamicJAXBContext(new MetadataContextInput(properties, classLoader));
}