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/03/07 19:54:17 UTC
svn commit: r383956 -
/incubator/servicemix/trunk/servicemix-http/src/main/java/org/apache/servicemix/http/HttpEndpoint.java
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();
}