summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src/main/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-02-21 14:15:59 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-02-21 14:15:59 +0000
commitdb627bc1b830b456032abc2aa5bbd39106dfa0c7 (patch)
tree5c250906de8472ae5baf0569a53662575155fc49 /sca-java-2.x/trunk/modules/core/src/main/java
parent9ad8f390696d3aaa7273b2442abf878270c3ae61 (diff)
TUSCANY-3834: Update to use the Monitor when logging the stop exception
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1072974 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
index 3604f81ec4..15aab449d4 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl.java
@@ -41,6 +41,8 @@ import org.apache.tuscany.sca.core.scope.ScopeContainer;
import org.apache.tuscany.sca.core.scope.ScopeRegistry;
import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.provider.EndpointReferenceAsyncProvider;
import org.apache.tuscany.sca.provider.ImplementationProvider;
import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
@@ -66,11 +68,13 @@ public class CompositeActivatorImpl implements CompositeActivator {
private final ScopeRegistry scopeRegistry;
private final ProviderFactoryExtensionPoint providerFactories;
+ private Monitor monitor;
public CompositeActivatorImpl(ExtensionPointRegistry extensionPoints) {
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
this.scopeRegistry = utilities.getUtility(ScopeRegistry.class);
this.providerFactories = extensionPoints.getExtensionPoint(ProviderFactoryExtensionPoint.class);
+ this.monitor = utilities.getUtility(MonitorFactory.class).createMonitor();
}
//=========================================================================
@@ -393,7 +397,7 @@ public class CompositeActivatorImpl implements CompositeActivator {
try {
stop(compositeContext, (Composite) implementation);
} catch (Throwable e1) {
- logger.log(Level.SEVERE, e1.getMessage(), e1);
+ Monitor.error(monitor, this, "core-messages", "StopException", e1);
}
rethrow(e);
}
@@ -427,7 +431,7 @@ public class CompositeActivatorImpl implements CompositeActivator {
try {
providers.get(i).stop();
} catch (Throwable e1) {
- logger.log(Level.SEVERE, e1.getMessage(), e1);
+ Monitor.error(monitor, this, "core-messages", "StopException", e1);
}
}
rethrow(e);
@@ -488,14 +492,14 @@ public class CompositeActivatorImpl implements CompositeActivator {
}
});
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
for (PolicyProvider policyProvider : ((RuntimeComponent)component).getPolicyProviders()) {
try {
policyProvider.stop();
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
}
@@ -507,7 +511,7 @@ public class CompositeActivatorImpl implements CompositeActivator {
try {
runtimeComponent.getScopeContainer().stop();
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
}
@@ -570,14 +574,14 @@ public class CompositeActivatorImpl implements CompositeActivator {
}
});
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
for (PolicyProvider policyProvider : ep.getPolicyProviders()) {
try {
policyProvider.stop();
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
}
@@ -645,14 +649,14 @@ public class CompositeActivatorImpl implements CompositeActivator {
try {
bindingProvider.stop();
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
for (PolicyProvider policyProvider : epr.getPolicyProviders()) {
try {
policyProvider.stop();
} catch (Throwable ex){
- logger.log(Level.SEVERE, ex.getMessage(), ex);
+ Monitor.error(monitor, this, "core-messages", "StopException", ex);
}
}
}