You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2006/08/31 11:32:14 UTC
svn commit: r438849 - in
/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi:
container/JBIContainer.java nmr/flow/jca/JCAFlow.java
nmr/flow/jms/JMSFlow.java
Author: gnodet
Date: Thu Aug 31 02:32:13 2006
New Revision: 438849
URL: http://svn.apache.org/viewvc?rev=438849&view=rev
Log:
Ensure clean shutdown when closing the jvm
Modified:
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java
Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java?rev=438849&r1=438848&r2=438849&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/container/JBIContainer.java Thu Aug 31 02:32:13 2006
@@ -620,8 +620,10 @@
autoDeployService.shutDown();
deploymentService.shutDown();
installationService.shutDown();
- registry.shutDown();
+ // Shutdown broker before registry to avoid the JCA/JMS flow to send
+ // lots of messages when components and endpoints are stopped.
broker.shutDown();
+ registry.shutDown();
clientFactory.shutDown();
environmentContext.shutDown();
// shutdown the management context last, because it will close the mbean server
@@ -667,7 +669,6 @@
*/
protected void containerShutdown() {
try {
- stop();
shutDown();
}
catch (Exception e) {
Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java?rev=438849&r1=438848&r2=438849&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jca/JCAFlow.java Thu Aug 31 02:32:13 2006
@@ -356,8 +356,7 @@
advisoryConsumer.close();
}
catch (JMSException e) {
- JBIException jbiEx = new JBIException("JMSException caught in stop: " + e.getMessage());
- throw jbiEx;
+ log.debug("JMSException caught in stop" ,e);
}
}
}
@@ -375,18 +374,18 @@
try {
connector.destroy();
} catch (Exception e) {
- log.warn("error closing jca connector", e);
+ log.debug("Error closing jca connector", e);
}
}
try {
containerConnector.destroy();
} catch (Exception e) {
- log.warn("error closing jca connector", e);
+ log.debug("Error closing jca connector", e);
}
try {
broadcastConnector.destroy();
} catch (Exception e) {
- log.warn("error closing jca connector", e);
+ log.debug("Error closing jca connector", e);
}
// Destroy the resource adapter
resourceAdapter.stop();
@@ -395,7 +394,7 @@
this.connection.close();
}
catch (JMSException e) {
- log.warn("error closing JMS Connection", e);
+ log.debug("Error closing JMS Connection", e);
}
}
}
Modified: incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java?rev=438849&r1=438848&r2=438849&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java (original)
+++ incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/nmr/flow/jms/JMSFlow.java Thu Aug 31 02:32:13 2006
@@ -342,8 +342,7 @@
advisoryConsumer.close();
broadcastConsumer.close();
} catch (JMSException e) {
- JBIException jbiEx = new JBIException("JMSException caught in stop: " + e.getMessage());
- throw jbiEx;
+ log.debug("JMSException caught in stop", e);
}
}
}