/** Returns a newly created JAXB unmarshaller. JAXB unmarshallers are not necessarily thread safe. */ protected Unmarshaller createUnmarshaller() { try { Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); if (unmarshallerProperties != null) { for (Iterator iterator = unmarshallerProperties.keySet().iterator(); iterator.hasNext();) { String name = (String) iterator.next(); unmarshaller.setProperty(name, unmarshallerProperties.get(name)); } } if (validationEventHandler != null) { unmarshaller.setEventHandler(validationEventHandler); } initJaxbUnmarshaller(unmarshaller); return unmarshaller; } catch (JAXBException ex) { throw convertJaxbException(ex); } }