class JAXBContextResolver implements ContextResolver<JAXBContextResolver> {

    public JAXBContext getJAXBContext(Class<?> aClass) throws JAXBException {
        JAXBContext jaxbContext = jaxbContexts.get(aClass);
        if (jaxbContext == null) {
            jaxbContexts.putIfAbsent(aClass, JAXBContext.newInstance(aClass));
        }
        return jaxbContexts.get(aClass);
    }

}