Author: asoldano
Date: 2014-05-20 06:22:02 -0400 (Tue, 20 May 2014)
New Revision: 18681
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
Log:
[JBWS-3779] WIP
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java 2014-05-20
10:21:21 UTC (rev 18680)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java 2014-05-20
10:22:02 UTC (rev 18681)
@@ -24,7 +24,6 @@
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentState;
-import org.jboss.wsf.spi.deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Service;
/**
@@ -41,8 +40,6 @@
private String simpleName;
// A deployment has one service
private Service service;
- // The type of this deployment
- private DeploymentType type;
// The state for this deployment
private DeploymentState state;
// The deployment class loader
@@ -109,14 +106,4 @@
{
this.state = deploymentState;
}
-
- public DeploymentType getType()
- {
- return type;
- }
-
- public void setType(DeploymentType deploymentType)
- {
- this.type = deploymentType;
- }
}
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java 2014-05-20
10:21:21 UTC (rev 18680)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/DeploymentAspectManagerImpl.java 2014-05-20
10:22:02 UTC (rev 18681)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -43,8 +43,7 @@
public class DeploymentAspectManagerImpl implements DeploymentAspectManager
{
private String name;
- private DeploymentAspectManager parent;
- private List<DeploymentAspect> depAspects = new
ArrayList<DeploymentAspect>();
+ private final List<DeploymentAspect> depAspects = new
ArrayList<DeploymentAspect>();
public String getName()
{
@@ -56,16 +55,6 @@
this.name = name;
}
- public DeploymentAspectManager getParent()
- {
- return parent;
- }
-
- public void setParent(DeploymentAspectManager parent)
- {
- this.parent = parent;
- }
-
public List<DeploymentAspect> getDeploymentAspects()
{
return Collections.unmodifiableList(depAspects);
@@ -122,19 +111,17 @@
DeploymentAspect aspect = deploymentAspects.get(i);
try
{
- if (aspect.canHandle(dep)) {
- logInvocation(aspect, "Start");
- ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
- try
- {
- SecurityActions.setContextClassLoader(aspect.getLoader());
- aspect.start(dep);
- }
- finally
- {
- SecurityActions.setContextClassLoader(origClassLoader);
- }
+ logInvocation(aspect, "Start");
+ ClassLoader origClassLoader = SecurityActions.getContextClassLoader();
+ try
+ {
+ SecurityActions.setContextClassLoader(aspect.getLoader());
+ aspect.start(dep);
}
+ finally
+ {
+ SecurityActions.setContextClassLoader(origClassLoader);
+ }
}
catch (RuntimeException rte)
{
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-05-20
10:21:21 UTC (rev 18680)
+++
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2014-05-20
10:22:02 UTC (rev 18681)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.common.deployment;
-import static org.jboss.ws.common.integration.WSHelper.isJaxrpcDeployment;
import static org.jboss.ws.common.integration.WSHelper.isJaxwsEjbEndpoint;
import static org.jboss.ws.common.integration.WSHelper.isJaxwsJseEndpoint;
@@ -118,8 +117,6 @@
protected boolean isConfidentialTransportGuarantee(final Deployment dep, final
Endpoint ep)
{
- if (isJaxrpcDeployment(dep)) return false;
-
String transportGuarantee = null;
if (isJaxwsJseEndpoint(ep))
{
Modified:
common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java
===================================================================
---
common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java 2014-05-20
10:21:21 UTC (rev 18680)
+++
common/trunk/src/main/java/org/jboss/ws/common/integration/AbstractDeploymentAspect.java 2014-05-20
10:22:02 UTC (rev 18681)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -42,8 +42,6 @@
private String requires;
private int relativeOrder;
private boolean isLast;
- private boolean isForJaxWs = true;
- private boolean isForJaxRpc = true;
private WeakReference<ClassLoader> loader;
public AbstractDeploymentAspect()
@@ -127,30 +125,4 @@
}
return condset;
}
-
- public boolean canHandle(Deployment dep)
- {
- return (this.isForJaxWs && WSHelper.isJaxwsDeployment(dep) ||
- this.isForJaxRpc && WSHelper.isJaxrpcDeployment(dep));
- }
-
- public boolean isForJaxWs()
- {
- return isForJaxWs;
- }
-
- public void setForJaxWs(boolean isForJaxWs)
- {
- this.isForJaxWs = isForJaxWs;
- }
-
- public boolean isForJaxRpc()
- {
- return isForJaxRpc;
- }
-
- public void setForJaxRpc(boolean isForJaxRpc)
- {
- this.isForJaxRpc = isForJaxRpc;
- }
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2014-05-20
10:21:21 UTC (rev 18680)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2014-05-20
10:22:02 UTC (rev 18681)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2014, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -21,10 +21,6 @@
*/
package org.jboss.ws.common.integration;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
-import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
-import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_EJB21;
-import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_JSE;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_EJB3;
import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
@@ -40,8 +36,6 @@
*/
public final class WSHelper {
- private static final EndpointTypeFilter JAXRPC_EJB_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXRPC_EJB21 );
- private static final EndpointTypeFilter JAXRPC_JSE_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXRPC_JSE );
private static final EndpointTypeFilter JAXWS_EJB_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXWS_EJB3 );
private static final EndpointTypeFilter JAXWS_JSE_ENDPOINT_FILTER = new
EndpointTypeFilterImpl( JAXWS_JSE );
private static final String WAR_EXTENSION = ".war";
@@ -108,7 +102,7 @@
*/
public static boolean isJaxwsJseDeployment( final Deployment dep )
{
- return isJaxwsDeployment( dep ) && dep.getService().getEndpoints(
JAXWS_JSE_ENDPOINT_FILTER ).size() > 0;
+ return dep.getService().getEndpoints( JAXWS_JSE_ENDPOINT_FILTER ).size() > 0;
}
/**
@@ -119,76 +113,32 @@
*/
public static boolean isJaxwsEjbDeployment( final Deployment dep )
{
- return isJaxwsDeployment( dep ) && dep.getService().getEndpoints(
JAXWS_EJB_ENDPOINT_FILTER ).size() > 0;
+ return dep.getService().getEndpoints( JAXWS_EJB_ENDPOINT_FILTER ).size() > 0;
}
/**
- * Returns true if deployment represents JAXRPC JSE deployment.
+ * Returns true if deployment represents a JSE deployment.
*
* @param dep webservice deployment
- * @return true if JAXRPC JSE deployment, false otherwise
+ * @return true if JSE deployment, false otherwise.
*/
- public static boolean isJaxrpcJseDeployment( final Deployment dep )
- {
- return isJaxrpcDeployment( dep ) && dep.getService().getEndpoints(
JAXRPC_JSE_ENDPOINT_FILTER ).size() > 0;
- }
-
- /**
- * Returns true if deployment represents JAXRPC EJB deployment.
- *
- * @param dep webservice deployment
- * @return true if JAXRPC EJB deployment, false otherwise
- */
- public static boolean isJaxrpcEjbDeployment( final Deployment dep )
- {
- return isJaxrpcDeployment( dep ) && dep.getService().getEndpoints(
JAXRPC_EJB_ENDPOINT_FILTER ).size() > 0;
- }
-
- /**
- * Returns true if deployment represents either JAXWS JSE or JAXRPC JSE deployment.
- *
- * @param dep webservice deployment
- * @return true if either JAXWS JSE or JAXRPC JSE deployment, false otherwise.
- */
public static boolean isJseDeployment( final Deployment dep )
{
- return isJaxwsJseDeployment( dep ) || isJaxrpcJseDeployment( dep );
+ return isJaxwsJseDeployment( dep );
}
/**
- * Returns true if deployment represents either JAXWS EJB or JAXRPC EJB deployment.
+ * Returns true if deployment represents an EJB deployment.
*
* @param dep webservice deployment
- * @return true if either JAXWS EJB or JAXRPC EJB deployment, false otherwise
+ * @return true if either EJB deployment, false otherwise
*/
public static boolean isEjbDeployment( final Deployment dep )
{
- return isJaxwsEjbDeployment( dep ) || isJaxrpcEjbDeployment( dep );
+ return isJaxwsEjbDeployment( dep );
}
/**
- * Returns true if deployment represents either JAXWS EJB or JAXWS JSE deployment.
- *
- * @param dep webservice deployment
- * @return true if either JAXWS EJB or JAXWS JSE deployment, false otherwise
- */
- public static boolean isJaxwsDeployment( final Deployment dep )
- {
- return JAXWS == dep.getType();
- }
-
- /**
- * Returns true if deployment represents either JAXRPC EJB or JAXRPC JSE deployment.
- *
- * @param dep webservice deployment
- * @return true if either JAXRPC EJB or JAXRPC JSE deployment, false otherwise
- */
- public static boolean isJaxrpcDeployment( final Deployment dep )
- {
- return JAXRPC == dep.getType();
- }
-
- /**
* Returns true if archive name ends with '.jar' suffix.
*
* @param dep webservice deployment
@@ -244,69 +194,36 @@
}
/**
- * Returns true if endpoint represents JAXRPC JSE endpoint.
+ * Returns true if endpoint represents a JSE endpoint.
*
* @param ep webservice endpoint
- * @return true if JAXRPC JSE endpoint, false otherwise
+ * @return true if JSE endpoint, false otherwise
*/
- public static boolean isJaxrpcJseEndpoint( final Endpoint ep )
- {
- return JAXRPC_JSE == ep.getType();
- }
-
- /**
- * Returns true if endpoint represents JAXRPC EJB21 endpoint.
- *
- * @param ep webservice endpoint
- * @return true if JAXRPC EJB21 endpoint, false otherwise
- */
- public static boolean isJaxrpcEjbEndpoint( final Endpoint ep )
- {
- return JAXRPC_EJB21 == ep.getType();
- }
-
- /**
- * Returns true if endpoint represents either JAXWS JSE or JAXRPC JSE endpoint.
- *
- * @param ep webservice endpoint
- * @return true if either JAXWS JSE or JAXRPC JSE endpoint, false otherwise
- */
public static boolean isJseEndpoint( final Endpoint ep )
{
- return isJaxwsJseEndpoint( ep ) || isJaxrpcJseEndpoint( ep );
+ return isJaxwsJseEndpoint( ep );
}
/**
- * Returns true if endpoint represents either JAXWS EJB3 or JAXRPC EJB21 endpoint.
+ * Returns true if endpoint represents either an EJB endpoint.
*
* @param ep webservice endpoint
- * @return true if either JAXWS EJB3 or JAXRPC EJB21 endpoint, false otherwise
+ * @return true if EJB endpoint, false otherwise
*/
public static boolean isEjbEndpoint( final Endpoint ep )
{
- return isJaxwsEjbEndpoint( ep ) || isJaxrpcEjbEndpoint( ep );
+ return isJaxwsEjbEndpoint( ep );
}
/**
- * Returns true if endpoint represents either JAXWS JSE or JAXWS EJB3 endpoint.
+ * Returns true if endpoint represents a JAXWS endpoint.
*
* @param ep webservice endpoint
- * @return true if either JAXWS JSE or JAXWS EJB3 endpoint, false otherwise
+ * @return true if either JAXWS endpoint, false otherwise
*/
public static boolean isJaxwsEndpoint( final Endpoint ep )
{
- return isJaxwsJseEndpoint( ep ) || isJaxwsEjbEndpoint( ep );
+ return isJaxwsJseEndpoint( ep );
}
- /**
- * Returns true if endpoint represents either JAXRPC JSE or JAXRPC EJB21 endpoint.
- *
- * @param ep webservice endpoint
- * @return true if either JAXRPC JSE or JAXRPC EJB21 endpoint, false otherwise
- */
- public static boolean isJaxrpcEndpoint( final Endpoint ep )
- {
- return isJaxrpcJseEndpoint( ep ) || isJaxrpcEjbEndpoint( ep );
- }
-
}