Author: asoldano
Date: 2013-10-10 06:25:14 -0400 (Thu, 10 Oct 2013)
New Revision: 17990
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
Log:
[JBWS-3717] Fixing EndpointResolver impls to check endpoint state
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2013-10-09
15:15:35 UTC (rev 17989)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/ws/core/server/PortComponentResolver.java 2013-10-10
10:25:14 UTC (rev 17990)
@@ -26,6 +26,7 @@
import org.jboss.ws.NativeLoggers;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointState;
import org.jboss.wsf.spi.management.EndpointResolver;
/**
@@ -55,16 +56,19 @@
while(endpoints.hasNext())
{
Endpoint auxEndpoint = endpoints.next();
- ServerEndpointMetaData sepMetaData =
auxEndpoint.getAttachment(ServerEndpointMetaData.class);
- if (pcName.equals(sepMetaData.getPortComponentName()))
+ if (EndpointState.STARTED.equals(auxEndpoint.getState()))
{
- if (endpoint != null)
+ ServerEndpointMetaData sepMetaData =
auxEndpoint.getAttachment(ServerEndpointMetaData.class);
+ if (pcName.equals(sepMetaData.getPortComponentName()))
{
- NativeLoggers.ROOT_LOGGER.multipleServiceEndpointFoundFor(pcLink);
- endpoint = null;
- break;
+ if (endpoint != null)
+ {
+ NativeLoggers.ROOT_LOGGER.multipleServiceEndpointFoundFor(pcLink);
+ endpoint = null;
+ break;
+ }
+ endpoint = auxEndpoint;
}
- endpoint = auxEndpoint;
}
}
Modified:
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java
===================================================================
---
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2013-10-09
15:15:35 UTC (rev 17989)
+++
stack/native/branches/jbossws-native-4.1.x/modules/core/src/main/java/org/jboss/wsf/stack/jbws/WebAppResolver.java 2013-10-10
10:25:14 UTC (rev 17990)
@@ -26,6 +26,7 @@
import javax.management.ObjectName;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointState;
import org.jboss.wsf.spi.management.EndpointResolver;
/**
@@ -55,13 +56,16 @@
while(endpoints.hasNext())
{
Endpoint auxEndpoint = endpoints.next();
- ObjectName sepId = auxEndpoint.getName();
- String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
- String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
- if (servletName.equals(propEndpoint) &&
contextPath.equals(propContext))
+ if (EndpointState.STARTED.equals(auxEndpoint.getState()))
{
- endpoint = auxEndpoint;
- break;
+ ObjectName sepId = auxEndpoint.getName();
+ String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
+ String propEndpoint =
sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
+ if (servletName.equals(propEndpoint) &&
contextPath.equals(propContext))
+ {
+ endpoint = auxEndpoint;
+ break;
+ }
}
}
Show replies by date