Author: gnodet
Date: Tue Jun 10 04:08:26 2008
New Revision: 666061
URL: http://svn.apache.org/viewvc?rev=666061&view=rev
Log:
SM-1392: Endpoint removal using DefaultComponent#removeEndpoint does not work
Modified:
servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceUnit.java
Modified:
servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceUnit.java
URL:
http://svn.apache.org/viewvc/servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceUnit.java?rev=666061&r1=666060&r2=666061&view=diff
==============================================================================
---
servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceUnit.java
(original)
+++
servicemix/smx3/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ServiceUnit.java
Tue Jun 10 04:08:26 2008
@@ -142,7 +142,8 @@
}
public void removeEndpoint(Endpoint endpoint) throws DeploymentException {
- if (this.endpoints.remove(endpoint) != null) {
+ String key = EndpointSupport.getKey(endpoint);
+ if (this.endpoints.remove(key) == null) {
throw new DeploymentException("Endpoint not found in the SU for
key: " + EndpointSupport.getKey(endpoint));
}
if (this.status == LifeCycleMBean.STARTED) {