From 09d13ed245bdf219f23d4601c17b3e2a1b40bb56 Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 18 May 2009 13:16:51 +0000 Subject: TUSCANY-3030 if the fault exception mapper is null try getting it from the registry before returning the fault unmapped. This takes care of the case there the mapper is null just because the JavaRuntimeModuleActivator is started before the DatabindingModuleActivator git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@775935 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/databinding/impl/MediatorImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java b/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java index 7e441e43b3..d94166588b 100644 --- a/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java +++ b/branches/sca-java-1.x/modules/databinding/src/main/java/org/apache/tuscany/sca/databinding/impl/MediatorImpl.java @@ -556,7 +556,14 @@ public class MediatorImpl implements Mediator { public Object copyFault(Object fault, Operation operation) { if (faultExceptionMapper == null) { - return fault; + // try to get the fault exception mapper again. It sometime null depending on what order the + // JavaRuntimeModuleActivator and DatabindingModuleActivator are started + this.faultExceptionMapper = + registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(FaultExceptionMapper.class); + + if (faultExceptionMapper == null) { + return fault; + } } for (DataType et : operation.getFaultTypes()) { if (et.getPhysical().isInstance(fault)) { -- cgit v1.2.3