diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java')
-rw-r--r-- | sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java b/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java index e6fc1b4405..5070d0636c 100644 --- a/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java +++ b/sca-java-2.x/trunk/modules/databinding-jaxb/src/main/java/org/apache/tuscany/sca/databinding/jaxb/Node2JAXB.java @@ -45,7 +45,11 @@ public class Node2JAXB extends BaseTransformer<Node, Object> implements PullTran try { JAXBContext jaxbContext = contextHelper.createJAXBContext(context, false); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - Object result = unmarshaller.unmarshal(source, JAXBContextHelper.getJavaType(context.getTargetDataType())); + Object result; + // TUSCANY-3971 + synchronized(source){ + result = unmarshaller.unmarshal(source, JAXBContextHelper.getJavaType(context.getTargetDataType())); + } return JAXBContextHelper.createReturnValue(jaxbContext, context.getTargetDataType(), result); } catch (Exception e) { throw new TransformationException(e); |