Author: davsclaus
Date: Wed Mar  7 21:22:57 2012
New Revision: 1298125

URL: http://svn.apache.org/viewvc?rev=1298125&view=rev
Log:
CAMEL-5058: Reverted rev 1296653 as new patch is on the way.

Removed:
    
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/InflightRepositoryRemoveRouteTest.java
Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
    
camel/trunk/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java?rev=1298125&r1=1298124&r2=1298125&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
 Wed Mar  7 21:22:57 2012
@@ -78,15 +78,6 @@ public class DefaultInflightRepository e
         return answer != null ? answer.get() : 0;
     }
 
-    public void removeEndpoint(Endpoint endpoint) {
-        // remove endpoint if there is no current inflight
-        String key = endpoint.getEndpointKey();
-        AtomicInteger existing = endpointCount.get(key);
-        if (existing != null && existing.get() <= 0) {
-            endpointCount.remove(key);
-        }
-    }
-
     @Override
     protected void doStart() throws Exception {
     }

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java?rev=1298125&r1=1298124&r2=1298125&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java 
(original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/impl/RouteService.java 
Wed Mar  7 21:22:57 2012
@@ -272,11 +272,6 @@ public class RouteService extends ChildS
         for (LifecycleStrategy strategy : 
camelContext.getLifecycleStrategies()) {
             strategy.onRoutesRemove(routes);
         }
-        
-        // remove the routes from the inflight registry
-        for (Route route : routes) {
-            
camelContext.getInflightRepository().removeEndpoint(route.getEndpoint());
-        }
 
         // remove the routes from the collections
         camelContext.removeRouteCollection(routes);

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java?rev=1298125&r1=1298124&r2=1298125&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/spi/InflightRepository.java
 Wed Mar  7 21:22:57 2012
@@ -60,13 +60,4 @@ public interface InflightRepository exte
      */
     int size(Endpoint endpoint);
 
-    /**
-     * Remove a endpoint from this registry.
-     * <p/>
-     * This is used to cleanup resources that are no longer needed.
-     *
-     * @param endpoint the endpoint to remove
-     */
-    void removeEndpoint(Endpoint endpoint);
-
 }


Reply via email to