servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r966104 - in /servicemix/smx4/nmr/trunk/jbi: itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java
Date Wed, 21 Jul 2010 06:59:45 GMT
Author: gnodet
Date: Wed Jul 21 06:59:44 2010
New Revision: 966104

URL: http://svn.apache.org/viewvc?rev=966104&view=rev
Log:
SMX4NMR-216: Shutdown issues with the NMR/JBI management layer

Modified:
    servicemix/smx4/nmr/trunk/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
    servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java

Modified: servicemix/smx4/nmr/trunk/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java?rev=966104&r1=966103&r2=966104&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/itests/src/test/java/org/apache/servicemix/jbi/itests/IntegrationTest.java
Wed Jul 21 06:59:44 2010
@@ -107,11 +107,9 @@ public class IntegrationTest extends Abs
         ServiceAssembly sa = getOsgiService(ServiceAssembly.class);
         assertNotNull(sa);
 
-        Thread.sleep(500);
-        
         final List<Throwable> errors = new CopyOnWriteArrayList<Throwable>();
         final int nbThreads = 2;
-        final int nbMessagesPerThread = 10;
+        final int nbMessagesPerThread = 2;
         final CountDownLatch latch = new CountDownLatch(nbThreads * nbMessagesPerThread);
         for (int i = 0; i < nbThreads; i++) {
             new Thread() {

Modified: servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java?rev=966104&r1=966103&r2=966104&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java
(original)
+++ servicemix/smx4/nmr/trunk/jbi/runtime/src/main/java/org/apache/servicemix/jbi/runtime/impl/EnvironmentImpl.java
Wed Jul 21 06:59:44 2010
@@ -122,7 +122,9 @@ public class EnvironmentImpl implements 
     }
 
     public void unmanageObject(Object managedObject) throws Exception {
-        getManagementStrategy().unmanageObject(managedObject);
+        if (getManagementStrategy().isManaged(managedObject, null)) {
+            getManagementStrategy().unmanageObject(managedObject);
+        }
     }
 
     public void unmanageNamedObject(ObjectName name) throws Exception {



Mime
View raw message