Author: jim.ma
Date: 2011-09-01 03:21:16 -0400 (Thu, 01 Sep 2011)
New Revision: 14917
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/DefaultService.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
Log:
JBWS-3346:Change the implemenation
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -37,6 +37,7 @@
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
@@ -68,6 +69,8 @@
protected String address;
protected List<RecordProcessor> recordProcessors = new
Vector<RecordProcessor>();
protected SecurityDomainContext securityDomainContext;
+ protected EndpointType type;
+ protected String contextRoot;
AbstractDefaultEndpoint(String targetBean)
{
@@ -295,5 +298,22 @@
{
this.securityDomainContext = securityDomainContext;
}
-
+ public void setType(EndpointType type)
+ {
+ this.type = type;
+ }
+
+ public EndpointType getType()
+ {
+ return this.type;
+ }
+
+ public String getContextRoot() {
+ return this.contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot) {
+ this.contextRoot = contextRoot;
+ }
+
}
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -47,7 +47,9 @@
@Override
public void start(Deployment dep)
{
- String contextRoot = dep.getService().getContextRoot();
+ //TODO: set contextRoot to each endpoint
+ String contextRoot = null;
+ //dep.getService().getContextRoot();
if (contextRoot == null)
{
contextRoot = getExplicitContextRoot(dep);
@@ -58,7 +60,7 @@
if (contextRoot.startsWith("/") == false)
contextRoot = "/" + contextRoot;
- dep.getService().setContextRoot(contextRoot);
+ // dep.getService().setContextRoot(contextRoot);
}
}
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/DefaultService.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -25,6 +25,7 @@
import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointTypeFilter;
import java.util.LinkedList;
import java.util.List;
@@ -69,6 +70,20 @@
{
return endpoints;
}
+
+ public List<Endpoint> getEndpoints(EndpointTypeFilter filter)
+ {
+ List<Endpoint> result = new LinkedList<Endpoint>();
+ for (Endpoint endpoint : endpoints)
+ {
+ if (filter.accept(endpoint.getType()))
+ {
+ result.add(endpoint);
+ }
+ }
+ return result;
+ }
+
public Endpoint getEndpointByName(String shortName)
{
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -57,7 +57,9 @@
@Override
public void start(Deployment dep)
{
- String contextRoot = dep.getService().getContextRoot();
+ //TODO:set contextRoot to eache endpoint
+ //String contextRoot = dep.getService().getContextRoot();
+ String contextRoot = "";
if (contextRoot == null)
throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CANNOT_OBTAIN_CONTEXT_ROOT"));
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/EndpointNameDeploymentAspect.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -44,7 +44,9 @@
@Override
public void start(Deployment dep)
{
- String contextRoot = dep.getService().getContextRoot();
+ //TODO:set contextRoot to eache endpoint
+ //String contextRoot = dep.getService().getContextRoot();
+ String contextRoot = "";
if (contextRoot == null || contextRoot.startsWith("/") == false)
throw new IllegalStateException(BundleUtils.getMessage(bundle,
"CONTEXT_ROOT_EXPECTED_TO_START_WITH_LEADING_SLASH", contextRoot));
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -107,7 +107,8 @@
try {
introsConfigStream.close();
} catch (IOException e) {
- logger.error(BundleUtils.getMessage(bundle,
"ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService().getContextRoot() ),
e);
+ //TODO:logger.error(BundleUtils.getMessage(bundle,
"ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService().getContextRoot() ),
e);
+ logger.error(BundleUtils.getMessage(bundle,
"ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService()), e);
}
}
}
Modified:
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
===================================================================
---
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2011-09-01
07:12:23 UTC (rev 14916)
+++
common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2011-09-01
07:21:16 UTC (rev 14917)
@@ -94,7 +94,9 @@
urlPattern = bmd.getPortComponentURI();
if (urlPattern != null)
{
- String contextRoot = dep.getService().getContextRoot();
+ //TODO:set contextRoot to eache endpoint
+ //String contextRoot = dep.getService().getContextRoot();
+ String contextRoot = null;
if (urlPattern.startsWith("/") == false)
urlPattern = "/" + urlPattern;
Show replies by date