servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r383956 - /incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
Date Tue, 07 Mar 2006 18:54:17 GMT
Author: gnodet
Date: Tue Mar  7 10:54:15 2006
New Revision: 383956

URL: http://svn.apache.org/viewcvs?rev=383956&view=rev
Log:
Deregister external endpoint for http consumer endpoints

Modified:
    incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java

Modified: incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java?rev=383956&r1=383955&r2=383956&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
(original)
+++ incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
Tue Mar  7 10:54:15 2006
@@ -59,7 +59,8 @@
             activated = ctx.activateEndpoint(service, endpoint);
             processor = new ProviderProcessor(this);
         } else {
-            ctx.registerExternalEndpoint(new HttpExternalEndpoint(this));
+            activated = new HttpExternalEndpoint(this);
+            ctx.registerExternalEndpoint(activated);
             processor = new ConsumerProcessor(this);
         }
         processor.start();
@@ -69,11 +70,15 @@
      * @see org.servicemix.common.Endpoint#deactivate()
      */
     public void deactivate() throws Exception {
+        ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
         if (getRole() == Role.PROVIDER) {
             ServiceEndpoint ep = activated;
             activated = null;
-            ComponentContext ctx = this.serviceUnit.getComponent().getComponentContext();
             ctx.deactivateEndpoint(ep);
+        } else {
+            ServiceEndpoint ep = activated;
+            activated = null;
+            ctx.deregisterExternalEndpoint(ep);
         }
         processor.stop();
     }



Mime
View raw message