JBossWS SVN: r14958 - in container/jboss60/branches/jbossws-jboss600: src/main/java/org/jboss/webservices/integration/deployers and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-08 23:26:32 -0400 (Thu, 08 Sep 2011)
New Revision: 14958
Removed:
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
Modified:
container/jboss60/branches/jbossws-jboss600/
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
container/jboss60/branches/jbossws-jboss600/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-3351]:Change AS6 Integraiton layer to build and deploy EJB3 endpoint in a war file
Property changes on: container/jboss60/branches/jbossws-jboss600
___________________________________________________________________
Added: svn:mergeinfo
+ /container/jboss60/branches/jbossws-jboss600-JBWS-3343:14928-14951
Deleted: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, 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.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.webservices.integration.deployers;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.webservices.integration.deployers.deployment.WSDeploymentBuilder;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-
-/**
- * This deployer initializes JBossWS deployment meta data.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class WSDeploymentDeployer extends AbstractRealDeployer
-{
- /**
- * Constructor.
- */
- public WSDeploymentDeployer()
- {
- super();
-
- // inputs
- this.addInput(JBossWebMetaData.class);
- this.addInput(DeploymentType.class);
-
- // outputs
- this.addOutput(JBossWebMetaData.class);
- this.addOutput(Deployment.class);
- }
-
- /**
- * Creates new Web Service deployment and registers it with deployment unit.
- *
- * @param unit deployment unit
- * @throws DeploymentException if any error occurs
- */
- @Override
- protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
- {
- this.log.trace("Building JBoss agnostic webservices meta data model");
- WSDeploymentBuilder.getInstance().build(unit);
- }
-}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -26,9 +26,11 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webservices.integration.WebServiceDeployment;
+import org.jboss.webservices.integration.deployers.deployment.WSDeploymentBuilder;
import org.jboss.webservices.integration.util.ASHelper;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.webservices.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
@@ -51,8 +53,8 @@
this.addInput(WebServiceDeployment.class);
// outputs
- this.addOutput(DeploymentType.class);
this.addOutput(JBossWebMetaData.class);
+ this.addOutput(Deployment.class);
}
/**
@@ -64,25 +66,26 @@
@Override
protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
+
if (this.isJaxwsJseDeployment(unit))
{
this.log.debug("Detected JAXWS JSE deployment");
- unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JSE);
+ WSDeploymentBuilder.getInstance().build(unit, EndpointType.JAXWS_JSE);
}
- else if (this.isJaxwsEjbDeployment(unit))
+ if (this.isJaxwsEjbDeployment(unit))
{
this.log.debug("Detected JAXWS EJB3 deployment");
- unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_EJB3);
+ WSDeploymentBuilder.getInstance().build(unit, EndpointType.JAXWS_EJB3);
}
- else if (this.isJaxrpcJseDeployment(unit))
+ if (this.isJaxrpcJseDeployment(unit) && !isJaxwsJseDeployment(unit) && !isJaxwsEjbDeployment(unit))
{
this.log.debug("Detected JAXRPC JSE deployment");
- unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_JSE);
+ WSDeploymentBuilder.getInstance().build(unit, EndpointType.JAXRPC_JSE);
}
- else if (this.isJaxrpcEjbDeployment(unit))
+ if (this.isJaxrpcEjbDeployment(unit) && !isJaxwsJseDeployment(unit) && !isJaxwsEjbDeployment(unit))
{
this.log.debug("Detected JAXRPC EJB21 deployment");
- unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
+ WSDeploymentBuilder.getInstance().build(unit, EndpointType.JAXRPC_EJB21);
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -39,9 +39,9 @@
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
/**
@@ -80,12 +80,26 @@
*/
public final void newDeploymentModel(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment(unit);
+ final ArchiveDeployment dep;
+ if (unit.getAttachment(Deployment.class) != null)
+ {
+ dep = (ArchiveDeployment) unit.getAttachment(Deployment.class);
+ }
+ else
+ {
+ try
+ {
+ dep = this.newDeployment(unit);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
+ }
this.build(dep, unit);
-
- dep.addAttachment(DeploymentUnit.class, unit);
- unit.addAttachment(Deployment.class, dep);
}
/**
@@ -104,7 +118,7 @@
* @param dep deployment
* @return WS endpoint
*/
- protected final Endpoint newHttpEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
+ protected final Endpoint newHttpEndpoint(final String endpointClass, final String endpointName, final Deployment dep, final EndpointType endpointType)
{
if (endpointName == null)
{
@@ -119,7 +133,7 @@
final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass);
endpoint.setShortName(endpointName);
dep.getService().addEndpoint(endpoint);
-
+ endpoint.setType(endpointType);
return endpoint;
}
@@ -131,7 +145,7 @@
* @param dep deployment
* @return WS endpoint
*/
- protected final Endpoint newJMSEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
+ protected final Endpoint newJMSEndpoint(final String endpointClass, final String endpointName, final Deployment dep, final EndpointType endpointType)
{
if (endpointName == null)
{
@@ -146,6 +160,7 @@
final Endpoint endpoint = this.deploymentModelFactory.newJMSEndpoint(endpointClass);
endpoint.setShortName(endpointName);
dep.getService().addEndpoint(endpoint);
+ endpoint.setType(endpointType);
return endpoint;
}
@@ -193,8 +208,6 @@
dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
}
dep.setRuntimeClassLoader(unit.getClassLoader());
- final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
- dep.setType(deploymentType);
return dep;
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -25,6 +25,7 @@
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.webservices.integration.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
@@ -69,7 +70,7 @@
final String ejbClass = beanMetaData.getEjbClass();
this.log.debug("EJB21 class: " + ejbClass);
- this.newHttpEndpoint(ejbClass, ejbName, dep);
+ this.newHttpEndpoint(ejbClass, ejbName, dep, EndpointType.JAXRPC_EJB21);
}
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -26,6 +26,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebserviceDescriptionMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -68,7 +69,7 @@
final String servletClass = ASHelper.getEndpointName(servletMD);
this.log.debug("JSE class: " + servletClass);
- this.newHttpEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep, EndpointType.JAXRPC_JSE);
}
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -26,6 +26,7 @@
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.webservices.integration.WebServiceDeclaration;
import org.jboss.webservices.integration.WebServiceDeployment;
@@ -64,7 +65,7 @@
final String ejbClass = container.getComponentClassName();
this.log.debug("EJB3 class: " + ejbClass);
- final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep);
+ final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep, EndpointType.JAXWS_EJB3);
ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -28,6 +28,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointMetaData;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
@@ -63,7 +64,8 @@
{
endpoint.setName(endpoint.getImplementor());
}
- this.newJMSEndpoint(endpoint.getImplementor(), endpoint.getName(), dep);
+ this.newJMSEndpoint(endpoint.getImplementor(), endpoint.getName(), dep, EndpointType.JAXWS_JMS);
+
}
}
}
\ No newline at end of file
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -28,6 +28,7 @@
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
/**
* Creates new JAXWS JSE deployment.
@@ -64,7 +65,7 @@
final String servletClass = ASHelper.getEndpointName(servlet);
this.log.debug("JSE class: " + servletClass);
- this.newHttpEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep, EndpointType.JAXWS_JSE);
}
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -25,8 +25,7 @@
import java.util.Map;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.webservices.integration.util.ASHelper;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
/**
* JBossWS deployment model builder.
@@ -39,14 +38,15 @@
private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
/** Builders registry. */
- private static final Map<DeploymentType, DeploymentModelBuilder> builders = new HashMap<DeploymentType, DeploymentModelBuilder>();;
+ private static final Map<EndpointType, DeploymentModelBuilder> builders = new HashMap<EndpointType, DeploymentModelBuilder>();
static
{
- WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_JSE, new DeploymentModelBuilderJAXWS_JSE());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_JSE, new DeploymentModelBuilderJAXRPC_JSE());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXWS_EJB3, new DeploymentModelBuilderJAXWS_EJB3());
- WSDeploymentBuilder.builders.put(DeploymentType.JAXRPC_EJB21, new DeploymentModelBuilderJAXRPC_EJB21());
+ WSDeploymentBuilder.builders.put(EndpointType.JAXWS_JSE, new DeploymentModelBuilderJAXWS_JSE());
+ WSDeploymentBuilder.builders.put(EndpointType.JAXWS_JMS, new DeploymentModelBuilderJAXWS_JMS());
+ WSDeploymentBuilder.builders.put(EndpointType.JAXRPC_JSE, new DeploymentModelBuilderJAXRPC_JSE());
+ WSDeploymentBuilder.builders.put(EndpointType.JAXWS_EJB3, new DeploymentModelBuilderJAXWS_EJB3());
+ WSDeploymentBuilder.builders.put(EndpointType.JAXRPC_EJB21, new DeploymentModelBuilderJAXRPC_EJB21());
}
/**
@@ -72,13 +72,12 @@
*
* @param unit deployment unit
*/
- public void build(final DeploymentUnit unit)
+ public void build(final DeploymentUnit unit, final EndpointType endpointType)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- if (deploymentType != null)
+ if (endpointType != null)
{
- WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
+ WSDeploymentBuilder.builders.get(endpointType).newDeploymentModel(unit);
}
}
}
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -66,13 +66,13 @@
final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep);
dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
}
- else if (WSHelper.isJaxwsEjbDeployment(dep))
+ if (WSHelper.isJaxwsEjbDeployment(dep))
{
this.log.debug("Creating JBoss agnostic EJB3 meta data for deployment: " + dep.getSimpleName());
final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep);
dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
- else if (WSHelper.isJaxrpcEjbDeployment(dep))
+ if (WSHelper.isJaxrpcEjbDeployment(dep) && !WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
{
this.log.debug("Creating JBoss agnostic EJB21 meta data for deployment: " + dep.getSimpleName());
final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep);
Modified: container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2011-09-09 03:26:32 UTC (rev 14958)
@@ -38,7 +38,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.webservices.integration.WebServiceDeclaration;
import org.jboss.webservices.integration.WebServiceDeployment;
@@ -74,118 +74,12 @@
*/
public static boolean isWebServiceDeployment(final DeploymentUnit unit)
{
- return ASHelper.getOptionalAttachment(unit, DeploymentType.class) != null;
+ return ASHelper.getOptionalAttachment(unit, Deployment.class) != null;
}
- /**
- * Returns true if unit contains JAXRPC EJB deployment.
- *
- * @param unit deployment unit
- * @return true if JAXRPC EJB deployment, false otherwise
- */
- public static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
- {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- return DeploymentType.JAXRPC_EJB21.equals(deploymentType);
- }
/**
- * Returns true if unit contains JAXRPC JSE deployment.
- *
- * @param unit deployment unit
- * @return true if JAXRPC JSE deployment, false otherwise
- */
- public static boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
- {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
-
- return DeploymentType.JAXRPC_JSE.equals(deploymentType);
- }
-
- /**
- * Returns true if unit contains JAXWS EJB deployment.
- *
- * @param unit deployment unit
- * @return true if JAXWS EJB deployment, false otherwise
- */
- public static boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
- {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
-
- return DeploymentType.JAXWS_EJB3.equals(deploymentType);
- }
-
- /**
- * Returns true if unit contains JAXWS JSE deployment.
- *
- * @param unit deployment unit
- * @return true if JAXWS JSE deployment, false otherwise
- */
- public static boolean isJaxwsJseDeployment(final DeploymentUnit unit)
- {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
-
- return DeploymentType.JAXWS_JSE.equals(deploymentType);
- }
-
- /**
- * Returns true if unit contains either JAXWS JSE or JAXRPC JSE deployment.
- *
- * @param unit deployment unit
- * @return true if either JAXWS JSE or JAXRPC JSE deployment, false otherwise.
- */
- public static boolean isJseDeployment(final DeploymentUnit unit)
- {
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
-
- return isJaxwsJse || isJaxrpcJse;
- }
-
- /**
- * Returns true if unit contains either JAXWS EJB or JAXRPC EJB deployment.
- *
- * @param unit deployment unit
- * @return true if either JAXWS EJB or JAXRPC EJB deployment, false otherwise
- */
- public static boolean isEjbDeployment(final DeploymentUnit unit)
- {
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
-
- return isJaxwsEjb || isJaxrpcEjb;
- }
-
- /**
- * Returns true if unit contains either JAXWS EJB or JAXWS JSE deployment.
- *
- * @param unit deployment unit
- * @return true if either JAXWS EJB or JAXWS JSE deployment, false otherwise
- */
- public static boolean isJaxwsDeployment(final DeploymentUnit unit)
- {
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
-
- return isJaxwsEjb || isJaxwsJse;
- }
-
- /**
- * Returns true if unit contains either JAXRPC EJB or JAXRPC JSE deployment.
- *
- * @param unit deployment unit
- * @return true if either JAXRPC EJB or JAXRPC JSE deployment, false otherwise
- */
- public static boolean isJaxrpcDeployment(final DeploymentUnit unit)
- {
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
-
- return isJaxrpcEjb || isJaxrpcJse;
- }
-
- /**
* Gets list of JAXWS servlets meta data.
*
* @param unit deployment unit
Modified: container/jboss60/branches/jbossws-jboss600/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2011-09-09 03:03:15 UTC (rev 14957)
+++ container/jboss60/branches/jbossws-jboss600/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2011-09-09 03:26:32 UTC (rev 14958)
@@ -62,8 +62,6 @@
<bean name="WSTypeDeployer" class="org.jboss.webservices.integration.deployers.WSTypeDeployer"/>
- <bean name="WSDeploymentDeployer" class="org.jboss.webservices.integration.deployers.WSDeploymentDeployer"/>
-
<!-- WSDeploymentAspectDeployers factory -->
<bean name="WSAspectizedDeployersFactory" class="org.jboss.webservices.integration.deployers.WSAspectizedDeployersFactory">
<constructor>
13 years, 4 months
JBossWS SVN: r14957 - in common/trunk/src/main/java/org/jboss/ws/common: integration and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-08 23:03:15 -0400 (Thu, 08 Sep 2011)
New Revision: 14957
Modified:
common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAPIDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
common/trunk/src/main/java/org/jboss/ws/common/servlet/AbstractEndpointServlet.java
common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
Log:
[JBWS-3349]:Refactor stack agnostic DepoymentAspects to deploy EJB3 webservice in a war file
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -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,7 @@
protected String address;
protected List<RecordProcessor> recordProcessors = new Vector<RecordProcessor>();
protected SecurityDomainContext securityDomainContext;
+ protected EndpointType type;
AbstractDefaultEndpoint(String targetBean)
{
@@ -295,5 +297,13 @@
{
this.securityDomainContext = securityDomainContext;
}
-
+ public void setType(EndpointType type)
+ {
+ this.type = type;
+ }
+
+ public EndpointType getType()
+ {
+ return this.type;
+ }
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/ContextRootDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -45,7 +45,7 @@
private static final ResourceBundle bundle = BundleUtils.getBundle(ContextRootDeploymentAspect.class);
@Override
public void start(Deployment dep)
- {
+ {
String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null)
{
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 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultDeployment.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -39,8 +39,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
@@ -107,13 +105,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/DefaultService.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/DefaultService.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -22,9 +22,11 @@
package org.jboss.ws.common.deployment;
import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
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 +71,21 @@
{
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/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAPIDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAPIDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAPIDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -28,7 +28,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
@@ -46,7 +45,6 @@
@Override
public void start(Deployment dep)
{
- dep.setType(DeploymentType.JAXWS_JSE);
if (dep instanceof ArchiveDeployment)
{
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 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointAddressDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -33,8 +33,8 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -121,7 +121,7 @@
protected boolean isConfidentialTransportGuarantee(Deployment dep, Endpoint ep)
{
String transportGuarantee = null;
- if (DeploymentType.JAXWS_JSE == dep.getType())
+ if (EndpointType.JAXWS_JSE == ep.getType())
{
JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (webMetaData != null)
@@ -152,7 +152,7 @@
}
}
}
- else if (DeploymentType.JAXWS_EJB3 == dep.getType())
+ else if (EndpointType.JAXWS_EJB3 == ep.getType())
{
//TODO Unify annotation scans
Class implClass = ep.getTargetBeanClass();
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -26,9 +26,9 @@
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
import org.jboss.wsf.spi.invocation.InvocationType;
@@ -86,21 +86,19 @@
private InvocationHandler getInvocationHandler(Endpoint ep)
{
- Deployment dep = ep.getService().getDeployment();
- DeploymentType depType = dep.getType();
- String key = depType.toString();
+ String key = ep.getType().toString();
// Use a special key for MDB endpoints
- EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBArchiveMetaData uapp = ep.getService().getDeployment().getAttachment(EJBArchiveMetaData.class);
if (uapp != null)
{
EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
- if (depType == DeploymentType.JAXRPC_EJB21 && bmd instanceof MDBMetaData)
+ if (ep.getType() == EndpointType.JAXRPC_EJB21 && bmd instanceof MDBMetaData)
{
key = InvocationType.JAXRPC_MDB21.toString();
}
- else if (depType == DeploymentType.JAXWS_EJB3 && bmd instanceof MDBMetaData)
+ else if (ep.getType() == EndpointType.JAXWS_EJB3 && bmd instanceof MDBMetaData)
{
key = InvocationType.JAXWS_MDB3.toString();
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/JAXBIntroDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -107,7 +107,7 @@
try {
introsConfigStream.close();
} catch (IOException e) {
- logger.error(BundleUtils.getMessage(bundle, "ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService().getContextRoot() ), e);
+ logger.error(BundleUtils.getMessage(bundle, "ERROR_CLOSING_JAXB_INTRODUCTIONS", deployment.getService().getContextRoot()), e);
}
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -31,6 +31,7 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
@@ -77,7 +78,7 @@
// #1 For JSE lookup the url-pattern from the servlet mappings
JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
- if (webMetaData != null)
+ if (webMetaData != null && (ep.getType() == EndpointType.JAXWS_JSE || ep.getType() == EndpointType.JAXRPC_JSE))
{
String epName = ep.getShortName();
urlPattern = webMetaData.getServletMappings().get(epName);
@@ -87,7 +88,7 @@
// #2 Use the explicit urlPattern from port-component/port-component-uri
EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null)
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null && (ep.getType() == EndpointType.JAXWS_EJB3 || ep.getType() == EndpointType.JAXRPC_EJB21))
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
urlPattern = bmd.getPortComponentURI();
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/VirtualHostDeploymentAspect.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -29,8 +29,8 @@
import org.jboss.ws.api.annotation.WebContext;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
@@ -46,7 +46,7 @@
@Override
public void start(Deployment dep)
{
- if ( DeploymentType.JAXWS_EJB3.equals(dep.getType()))
+ if (WSHelper.isEjbDeployment(dep) && !WSHelper.isJaxwsJseDeployment(dep))
{
dep.getService().setVirtualHosts(getExplicitVirtualHosts(dep));
}
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 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/integration/WSHelper.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -26,7 +26,8 @@
import org.jboss.logging.Logger;
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
+import org.jboss.wsf.spi.deployment.EndpointTypeFilter;
/**
* Cross WS stack and JBoss AS integration helper.
@@ -102,7 +103,14 @@
*/
public static boolean isJaxrpcEjbDeployment( final Deployment dep )
{
- return DeploymentType.JAXRPC_EJB21.equals( dep.getType() );
+ return dep.getService().getEndpoints(new EndpointTypeFilter() {
+ public boolean accept(EndpointType type) {
+ if (type == EndpointType.JAXRPC_EJB21) {
+ return true;
+ }
+ return false;
+ }
+ }).size() > 0;
}
/**
@@ -113,7 +121,14 @@
*/
public static boolean isJaxrpcJseDeployment( final Deployment dep )
{
- return DeploymentType.JAXRPC_JSE.equals( dep.getType() );
+ return dep.getService().getEndpoints(new EndpointTypeFilter() {
+ public boolean accept(EndpointType type) {
+ if (type == EndpointType.JAXRPC_JSE) {
+ return true;
+ }
+ return false;
+ }
+ }).size() > 0;
}
/**
@@ -124,7 +139,15 @@
*/
public static boolean isJaxwsEjbDeployment( final Deployment dep )
{
- return DeploymentType.JAXWS_EJB3.equals( dep.getType() );
+ return dep.getService().getEndpoints(new EndpointTypeFilter() {
+ public boolean accept(EndpointType type) {
+ if (type == EndpointType.JAXWS_EJB3) {
+ return true;
+ }
+ return false;
+ }
+
+ }).size() > 0;
}
/**
@@ -135,7 +158,14 @@
*/
public static boolean isJaxwsJseDeployment( final Deployment dep )
{
- return DeploymentType.JAXWS_JSE.equals( dep.getType() );
+ return dep.getService().getEndpoints(new EndpointTypeFilter() {
+ public boolean accept(EndpointType type) {
+ if (type == EndpointType.JAXWS_JSE || type == EndpointType.JAXWS_JMS) {
+ return true;
+ }
+ return false;
+ }
+ }).size() > 0;
}
/**
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -167,7 +167,7 @@
}
catch (WSFException e)
{
- log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"), e);
+ log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"));
}
if (localPort <= 0)
{
@@ -198,7 +198,7 @@
}
catch (WSFException e)
{
- log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"), e);
+ log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"));
}
if (localPort <= 0)
Modified: common/trunk/src/main/java/org/jboss/ws/common/servlet/AbstractEndpointServlet.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/servlet/AbstractEndpointServlet.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/servlet/AbstractEndpointServlet.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -36,6 +36,7 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -166,8 +167,8 @@
private void setRuntimeLoader()
{
final Deployment dep = endpoint.getService().getDeployment();
- final boolean isJaxrpcJse = dep.getType() == Deployment.DeploymentType.JAXRPC_JSE;
- final boolean isJaxwsJse = dep.getType() == Deployment.DeploymentType.JAXWS_JSE;
+ final boolean isJaxrpcJse = WSHelper.isJaxrpcJseDeployment(dep);
+ final boolean isJaxwsJse = WSHelper.isJaxwsJseDeployment(dep);
if (isJaxrpcJse || isJaxwsJse)
{
Modified: common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2011-09-09 02:56:48 UTC (rev 14956)
+++ common/trunk/src/main/java/org/jboss/ws/common/utils/AbstractWSDLFilePublisher.java 2011-09-09 03:03:15 UTC (rev 14957)
@@ -39,6 +39,7 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.DOMUtils;
import org.jboss.ws.common.IOUtils;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
@@ -76,7 +77,7 @@
serverConfig = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
}
- if (dep.getType().toString().endsWith("JSE"))
+ if (WSHelper.isJseDeployment(dep))
{
expLocation = "WEB-INF/wsdl/";
}
13 years, 4 months
JBossWS SVN: r14956 - spi/trunk/src/main/java/org/jboss/wsf/spi/deployment.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-08 22:56:48 -0400 (Thu, 08 Sep 2011)
New Revision: 14956
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
Log:
[JBWS-3346]:Refactor service api
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2011-09-09 02:33:17 UTC (rev 14955)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2011-09-09 02:56:48 UTC (rev 14956)
@@ -49,13 +49,7 @@
/** Get the list of endpoints with EndpointTypeFilter*/
List<Endpoint> getEndpoints(EndpointTypeFilter filter);
-
- /** Get the endpoint type list */
- List<EndpointType> getEndpointTypes();
-
- /** Add endpoint type */
- void addEndpointType(EndpointType type);
-
+
/** Get an endpoint by name */
Endpoint getEndpointByName(String simpleName);
13 years, 4 months
JBossWS SVN: r14955 - spi/trunk/src/main/java/org/jboss/wsf/spi/deployment.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-08 22:33:17 -0400 (Thu, 08 Sep 2011)
New Revision: 14955
Added:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/EndpointTypeFilter.java
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
Log:
[JBWS-3346]:Add EndpointType and remove the context root from service
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2011-09-08 08:14:19 UTC (rev 14954)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Deployment.java 2011-09-09 02:33:17 UTC (rev 14955)
@@ -21,6 +21,7 @@
*/
package org.jboss.wsf.spi.deployment;
+
/**
* A general web service deployment dep.
*
@@ -30,11 +31,7 @@
*/
public interface Deployment extends Extensible
{
- public enum DeploymentType
- {
- JAXRPC_JSE, JAXRPC_EJB21, JAXWS_JSE, JAXWS_EJB3, @Deprecated JAXWS_JMS;
- };
-
+
public enum DeploymentState
{
UNDEFINED, STARTED, STOPPED
@@ -58,12 +55,7 @@
/** Set the runtime class loader for this deployment */
void setRuntimeClassLoader(ClassLoader loader);
- /** Get the deployment type */
- DeploymentType getType();
- /** Set the deployment type */
- void setType(DeploymentType type);
-
/** Get the current deployment state */
DeploymentState getState();
@@ -75,4 +67,4 @@
/** Set the service associated with this deployment */
void setService(Service service);
-}
+}
\ No newline at end of file
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java 2011-09-08 08:14:19 UTC (rev 14954)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManagerFactory.java 2011-09-09 02:33:17 UTC (rev 14955)
@@ -31,7 +31,7 @@
*/
public abstract class DeploymentAspectManagerFactory implements SPIView
{
- public abstract DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType);
+ //public abstract DeploymentAspectManager getDeploymentAspectManager(Deployment.DeploymentType deploymentType);
/**
* Get a named instance of a deployment aspect manager
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2011-09-08 08:14:19 UTC (rev 14954)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2011-09-09 02:33:17 UTC (rev 14955)
@@ -46,6 +46,11 @@
static final String SEPID_PROPERTY_ENDPOINT = "endpoint";
static final String SEPID_DOMAIN_ENDPOINT = SEPID_DOMAIN + "." + SEPID_PROPERTY_ENDPOINT;
+
+ public enum EndpointType
+ {
+ JAXRPC_JSE, JAXRPC_EJB21, JAXWS_JSE, JAXWS_EJB3, JAXWS_JMS;
+ };
public enum EndpointState
{
@@ -132,4 +137,12 @@
/** Set security domain context */
void setSecurityDomainContext(SecurityDomainContext context);
+
+
+ /** Set endpoint type */
+ void setType(EndpointType type);
+
+ /** get endpoint type */
+ EndpointType getType();
+
}
Copied: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/EndpointTypeFilter.java (from rev 14951, spi/branches/JBWS-3343/src/main/java/org/jboss/wsf/spi/deployment/EndpointTypeFilter.java)
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/EndpointTypeFilter.java (rev 0)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/EndpointTypeFilter.java 2011-09-09 02:33:17 UTC (rev 14955)
@@ -0,0 +1,9 @@
+package org.jboss.wsf.spi.deployment;
+
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
+
+public interface EndpointTypeFilter
+{
+ boolean accept(EndpointType type);
+
+}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2011-09-08 08:14:19 UTC (rev 14954)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Service.java 2011-09-09 02:33:17 UTC (rev 14955)
@@ -23,6 +23,8 @@
import java.util.List;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
+
/**
* A general service deployment.
*
@@ -42,22 +44,31 @@
/** Add an endpoint to the service */
void addEndpoint(Endpoint endpoint);
- /** Get the list of endpoints */
+ /** Get the list of endpoints*/
List<Endpoint> getEndpoints();
+ /** Get the list of endpoints with EndpointTypeFilter*/
+ List<Endpoint> getEndpoints(EndpointTypeFilter filter);
+
+ /** Get the endpoint type list */
+ List<EndpointType> getEndpointTypes();
+
+ /** Add endpoint type */
+ void addEndpointType(EndpointType type);
+
/** Get an endpoint by name */
Endpoint getEndpointByName(String simpleName);
+ /** Get the virtual hosts for this service */
+ List<String> getVirtualHosts();
+
+ /** Set the virtual hosts for this service */
+ void setVirtualHosts(List<String> virtualHosts);
+
/** Get the context root for this service */
String getContextRoot();
/** Set the context root for this service */
void setContextRoot(String contextRoot);
- /** Get the virtual hosts for this service */
- List<String> getVirtualHosts();
-
- /** Set the virtual hosts for this service */
- void setVirtualHosts(List<String> virtualHosts);
-
}
13 years, 4 months
JBossWS SVN: r14954 - in stack/native/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-09-08 04:14:19 -0400 (Thu, 08 Sep 2011)
New Revision: 14954
Modified:
stack/native/trunk/modules/testsuite/pom.xml
stack/native/trunk/pom.xml
Log:
[JBWS-3215] Reverting the changes related to jbossXYZ profiles, as having multiple jbossXYZ.home props defined in settings.xml causes multiple clashing profiles to be on w/ Maven 3 and the proper way of preventing this (http://jira.codehaus.org/browse/MNG-3328) is still not available.
Modified: stack/native/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/pom.xml 2011-09-08 07:42:13 UTC (rev 14953)
+++ stack/native/trunk/modules/testsuite/pom.xml 2011-09-08 08:14:19 UTC (rev 14954)
@@ -424,11 +424,6 @@
-->
<profile>
<id>jboss600</id>
- <activation>
- <property>
- <name>jboss600.home</name>
- </property>
- </activation>
<properties>
<jboss.version>6.0.0.Final</jboss.version>
<jbossws.integration.target>jboss600</jbossws.integration.target>
@@ -570,11 +565,6 @@
-->
<profile>
<id>jboss610</id>
- <activation>
- <property>
- <name>jboss610.home</name>
- </property>
- </activation>
<properties>
<jboss.version>6.1.0.Final</jboss.version>
<jbossws.integration.target>jboss610</jbossws.integration.target>
@@ -716,11 +706,6 @@
-->
<profile>
<id>jboss700</id>
- <activation>
- <property>
- <name>jboss700.home</name>
- </property>
- </activation>
<properties>
<jboss.version>7.0.0.Final</jboss.version>
<jbossws.integration.target>jboss700</jbossws.integration.target>
@@ -892,11 +877,6 @@
-->
<profile>
<id>jboss710</id>
- <activation>
- <property>
- <name>jboss710.home</name>
- </property>
- </activation>
<properties>
<jboss.version>7.1.0.Alpha1-SNAPSHOT</jboss.version>
<jbossws.integration.target>jboss710</jbossws.integration.target>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2011-09-08 07:42:13 UTC (rev 14953)
+++ stack/native/trunk/pom.xml 2011-09-08 08:14:19 UTC (rev 14954)
@@ -529,11 +529,6 @@
-->
<profile>
<id>jboss600</id>
- <activation>
- <property>
- <name>jboss600.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss600</jbossws.integration.target>
<jboss.home>${jboss600.home}</jboss.home>
@@ -546,11 +541,6 @@
-->
<profile>
<id>jboss610</id>
- <activation>
- <property>
- <name>jboss610.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss610</jbossws.integration.target>
<jboss.home>${jboss610.home}</jboss.home>
@@ -563,11 +553,6 @@
-->
<profile>
<id>jboss700</id>
- <activation>
- <property>
- <name>jboss700.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss700</jbossws.integration.target>
<jboss.home>${jboss700.home}</jboss.home>
@@ -580,11 +565,6 @@
-->
<profile>
<id>jboss710</id>
- <activation>
- <property>
- <name>jboss710.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss710</jbossws.integration.target>
<jboss.home>${jboss710.home}</jboss.home>
13 years, 4 months
JBossWS SVN: r14953 - in stack/cxf/trunk: modules/testsuite and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2011-09-08 03:42:13 -0400 (Thu, 08 Sep 2011)
New Revision: 14953
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-3215] Reverting the changes related to jbossXYZ profiles, as having multiple jbossXYZ.home props defined in settings.xml causes multiple clashing profiles to be on w/ Maven 3 and the proper way of preventing this (http://jira.codehaus.org/browse/MNG-3328) is still not available.
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2011-09-08 05:34:08 UTC (rev 14952)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2011-09-08 07:42:13 UTC (rev 14953)
@@ -575,11 +575,6 @@
-->
<profile>
<id>jboss600</id>
- <activation>
- <property>
- <name>jboss600.home</name>
- </property>
- </activation>
<properties>
<jboss.version>6.0.0.Final</jboss.version>
<jbossws.integration.target>jboss600</jbossws.integration.target>
@@ -757,11 +752,6 @@
-->
<profile>
<id>jboss610</id>
- <activation>
- <property>
- <name>jboss610.home</name>
- </property>
- </activation>
<properties>
<jboss.version>6.1.0.Final</jboss.version>
<jbossws.integration.target>jboss610</jbossws.integration.target>
@@ -939,11 +929,6 @@
-->
<profile>
<id>jboss700</id>
- <activation>
- <property>
- <name>jboss700.home</name>
- </property>
- </activation>
<properties>
<jboss.version>7.0.0.Final</jboss.version>
<jbossws.integration.target>jboss700</jbossws.integration.target>
@@ -1135,11 +1120,6 @@
-->
<profile>
<id>jboss710</id>
- <activation>
- <property>
- <name>jboss710.home</name>
- </property>
- </activation>
<properties>
<jboss.version>7.1.0.Alpha1-SNAPSHOT</jboss.version>
<jbossws.integration.target>jboss710</jbossws.integration.target>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2011-09-08 05:34:08 UTC (rev 14952)
+++ stack/cxf/trunk/pom.xml 2011-09-08 07:42:13 UTC (rev 14953)
@@ -1273,11 +1273,6 @@
-->
<profile>
<id>jboss600</id>
- <activation>
- <property>
- <name>jboss600.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss600</jbossws.integration.target>
<jboss.home>${jboss600.home}</jboss.home>
@@ -1290,11 +1285,6 @@
-->
<profile>
<id>jboss610</id>
- <activation>
- <property>
- <name>jboss610.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss610</jbossws.integration.target>
<jboss.home>${jboss610.home}</jboss.home>
@@ -1307,11 +1297,6 @@
-->
<profile>
<id>jboss700</id>
- <activation>
- <property>
- <name>jboss700.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss700</jbossws.integration.target>
<jboss.home>${jboss700.home}</jboss.home>
@@ -1324,11 +1309,6 @@
-->
<profile>
<id>jboss710</id>
- <activation>
- <property>
- <name>jboss710.home</name>
- </property>
- </activation>
<properties>
<jbossws.integration.target>jboss710</jbossws.integration.target>
<jboss.home>${jboss710.home}</jboss.home>
13 years, 4 months
JBossWS SVN: r14952 - container/jboss60/branches/jbossws-jboss610-JBWS-3343/src/main/java/org/jboss/webservices/integration/metadata.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-08 01:34:08 -0400 (Thu, 08 Sep 2011)
New Revision: 14952
Modified:
container/jboss60/branches/jbossws-jboss610-JBWS-3343/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
Log:
[JBWS-3351]:To build EJBArchiveMetaData for deployment contains EJB21 endpoint
Modified: container/jboss60/branches/jbossws-jboss610-JBWS-3343/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss60/branches/jbossws-jboss610-JBWS-3343/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-09-08 03:27:23 UTC (rev 14951)
+++ container/jboss60/branches/jbossws-jboss610-JBWS-3343/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2011-09-08 05:34:08 UTC (rev 14952)
@@ -66,13 +66,13 @@
final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep);
dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
}
- else if (WSHelper.isJaxwsEjbDeployment(dep))
+ if (WSHelper.isJaxwsEjbDeployment(dep))
{
this.log.debug("Creating JBoss agnostic EJB3 meta data for deployment: " + dep.getSimpleName());
final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep);
dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
- else if (WSHelper.isJaxrpcEjbDeployment(dep))
+ if (WSHelper.isJaxrpcEjbDeployment(dep) && !WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
{
this.log.debug("Creating JBoss agnostic EJB21 meta data for deployment: " + dep.getSimpleName());
final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep);
13 years, 4 months
JBossWS SVN: r14951 - in stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss: ws/core/server and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-07 23:27:23 -0400 (Wed, 07 Sep 2011)
New Revision: 14951
Modified:
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
Log:
JBWS-3359:To support deploy ejb webservice in a war file
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/http/NettyHttpServerAdapter.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -44,9 +44,9 @@
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
import org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect;
import org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect;
@@ -185,9 +185,9 @@
endpoint.setShortName(this.getEndpointRegistryPath(epImpl));
((HttpEndpoint)endpoint).setURLPattern(epImpl.getPathWithoutContext());
dep.getService().addEndpoint(endpoint);
+ endpoint.setType(EndpointType.JAXWS_JSE);
dep.setRootFile(new ResourceLoaderAdapter(loader));
- dep.setRuntimeClassLoader(loader);
- dep.setType(DeploymentType.JAXWS_JSE);
+ dep.setRuntimeClassLoader(loader);
dep.getService().setContextRoot(contextRoot);
// TODO: remove this properties hack
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/core/server/ServiceEndpointInvoker.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -73,8 +73,8 @@
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
import org.jboss.wsf.spi.invocation.InvocationHandler;
@@ -324,8 +324,7 @@
CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
if (msgContext instanceof SOAPMessageContextJAXWS)
{
- final DeploymentType deploymentType = ep.getService().getDeployment().getType();
- if ((DeploymentType.JAXWS_JSE == deploymentType) || (DeploymentType.JAXWS_EJB3 == deploymentType))
+ if ((EndpointType.JAXWS_JSE == ep.getType()) || (EndpointType.JAXWS_EJB3 == ep.getType()))
{
if (msgContext.get(MessageContext.SERVLET_REQUEST) != null)
{
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -46,6 +46,7 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.Constants;
import org.jboss.ws.common.ObjectNameFactory;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.core.jaxrpc.UnqualifiedFaultException;
import org.jboss.ws.core.soap.Use;
import org.jboss.ws.extensions.addressing.AddressingPropertiesImpl;
@@ -72,6 +73,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.HttpEndpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
@@ -202,7 +204,8 @@
// Add JMS destination JNDI name for MDB endpoints
EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (apMetaData != null)
+ if (apMetaData != null
+ && (EndpointType.JAXWS_EJB3 == sepMetaData.getEndpoint().getType() || EndpointType.JAXRPC_EJB21 == sepMetaData.getEndpoint().getType()))
{
String ejbName = sepMetaData.getLinkName();
if (ejbName == null)
@@ -289,7 +292,8 @@
{
String transportGuarantee = null;
JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
- if (webMetaData != null)
+ if (webMetaData != null
+ && (EndpointType.JAXWS_JSE == sepMetaData.getEndpoint().getType() || EndpointType.JAXRPC_JSE == sepMetaData.getEndpoint().getType()))
{
Map<String, String> servletMappings = webMetaData.getServletMappings();
String urlPattern = servletMappings.get(servletLink);
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -139,7 +139,7 @@
serviceMetaData.setServiceName(wsdlEndpoint.getWsdlService().getName());
QName interfaceQName = wsdlEndpoint.getInterface().getName();
- Endpoint ep = dep.getService().getEndpointByName(linkName);
+ Endpoint ep = dep.getService().getEndpointByName(linkName);
ServerEndpointMetaData sepMetaData = new ServerEndpointMetaData(serviceMetaData, ep, portName, interfaceQName, Type.JAXRPC);
sepMetaData.setPortComponentName(pcMetaData.getPortComponentName());
sepMetaData.setLinkName(linkName);
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -60,14 +60,18 @@
log.debug("START buildMetaData: [name=" + dep.getCanonicalName() + "]");
try
{
- UnifiedMetaData wsMetaData = new UnifiedMetaData(dep.getRootFile());
- wsMetaData.setDeploymentName(dep.getCanonicalName());
+ UnifiedMetaData wsMetaData = dep.getAttachment(UnifiedMetaData.class);
+ if (wsMetaData == null)
+ {
+ wsMetaData = new UnifiedMetaData(dep.getRootFile());
+ wsMetaData.setDeploymentName(dep.getCanonicalName());
- ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
- if(null == runtimeClassLoader)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "RUNTIME_LOADER_CANNOT_BE_NULL"));
- wsMetaData.setClassLoader(new DelegateClassLoader(runtimeClassLoader, SecurityActions.getContextClassLoader()));
-
+ ClassLoader runtimeClassLoader = dep.getRuntimeClassLoader();
+ if (null == runtimeClassLoader)
+ throw new IllegalArgumentException(BundleUtils.getMessage(bundle, "RUNTIME_LOADER_CANNOT_BE_NULL"));
+ wsMetaData.setClassLoader(new DelegateClassLoader(runtimeClassLoader, SecurityActions
+ .getContextClassLoader()));
+ }
// The container objects below provide access to all of the ejb metadata
EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
Iterator<EJBMetaData> it = apMetaData.getEnterpriseBeans();
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderJSE.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -30,6 +30,8 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointType;
+import org.jboss.wsf.spi.deployment.EndpointTypeFilter;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -60,7 +62,18 @@
wsMetaData.setClassLoader(new DelegateClassLoader(runtimeClassLoader, SecurityActions.getContextClassLoader()));
// For every bean
- for (Endpoint ep : dep.getService().getEndpoints())
+ for (Endpoint ep : dep.getService().getEndpoints((new EndpointTypeFilter() {
+
+ @Override
+ public boolean accept(EndpointType type)
+ {
+ if (EndpointType.JAXWS_JSE == type) {
+ return true;
+ }
+ return false;
+ }
+
+ })))
{
String shortName = ep.getShortName();
Class beanClass = ep.getTargetBeanClass();
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSServerMetaDataBuilder.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -29,11 +29,11 @@
import org.jboss.ws.api.annotation.EndpointConfig;
import org.jboss.ws.api.annotation.WebContext;
import org.jboss.ws.api.util.BundleUtils;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.metadata.umdm.ServerEndpointMetaData;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
@@ -104,7 +104,7 @@
if (anWebContext == null)
return;
- boolean isJSEEndpoint = (dep.getType() == DeploymentType.JAXWS_JSE);
+ boolean isJSEEndpoint = WSHelper.isJaxwsJseDeployment(dep);
// context-root
if (anWebContext.contextRoot().length() > 0)
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/Message.properties 2011-09-08 03:27:23 UTC (rev 14951)
@@ -1,4 +1,4 @@
-INVALID_DEPLOYMENT_TYPE=Invalid deployment type: {0}
+INVALID_DEPLOYMENT_TYPE=Invalid endpoint type in deployment: {0}
CANNOT_FIND_ENDPOINTMD=Cannot find endpoint meta data for: {0}
ERROR_SETTING_CONTEXT_CLASSLOADER=Error setting context classloader
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/ServiceEndpointInvokerDeploymentAspect.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -24,9 +24,9 @@
import org.jboss.ws.core.server.ServiceEndpointInvoker;
import org.jboss.ws.core.server.ServiceEndpointInvokerEJB21;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
/**
* A deployer that associates the ServiceEndpointInvoker with the endpoint
@@ -44,8 +44,8 @@
ServiceEndpointInvoker epInvoker = ep.getAttachment(ServiceEndpointInvoker.class);
if (epInvoker == null)
{
- DeploymentType depType = ep.getService().getDeployment().getType();
- if (depType == DeploymentType.JAXRPC_EJB21)
+
+ if (WSHelper.isJaxrpcEjbDeployment(dep))
{
epInvoker = new ServiceEndpointInvokerEJB21();
}
Modified: stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java
===================================================================
--- stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2011-09-08 02:57:21 UTC (rev 14950)
+++ stack/native/branches/JBWS-3343/modules/core/src/main/java/org/jboss/wsf/stack/jbws/UnifiedMetaDataDeploymentAspect.java 2011-09-08 03:27:23 UTC (rev 14951)
@@ -25,6 +25,7 @@
import org.jboss.ws.api.util.BundleUtils;
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.ws.common.integration.WSHelper;
import org.jboss.ws.metadata.builder.jaxrpc.JAXRPCServerMetaDataBuilder;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3;
import org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE;
@@ -34,7 +35,6 @@
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.Endpoint;
/**
@@ -52,31 +52,33 @@
UnifiedMetaData umd = dep.getAttachment(UnifiedMetaData.class);
if (umd == null)
{
- if (dep.getType() == DeploymentType.JAXRPC_JSE)
+ if (WSHelper.isJaxwsJseDeployment(dep))
{
- JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+ JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
umd = builder.buildMetaData((ArchiveDeployment)dep);
+ dep.addAttachment(UnifiedMetaData.class, umd);
}
- else if (dep.getType() == DeploymentType.JAXRPC_EJB21)
+ if (WSHelper.isJaxwsEjbDeployment(dep))
{
- JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
+ JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- else if (dep.getType() == DeploymentType.JAXWS_JSE)
+ if (WSHelper.isJaxrpcJseDeployment(dep) && !WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
{
- JAXWSMetaDataBuilderJSE builder = new JAXWSMetaDataBuilderJSE();
+ JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- else if (dep.getType() == DeploymentType.JAXWS_EJB3)
+ else if (WSHelper.isJaxrpcEjbDeployment(dep) && !WSHelper.isJaxwsJseDeployment(dep) && !WSHelper.isJaxwsEjbDeployment(dep))
{
- JAXWSMetaDataBuilderEJB3 builder = new JAXWSMetaDataBuilderEJB3();
+ JAXRPCServerMetaDataBuilder builder = new JAXRPCServerMetaDataBuilder();
umd = builder.buildMetaData((ArchiveDeployment)dep);
}
- else
- {
- throw new IllegalStateException(BundleUtils.getMessage(bundle, "INVALID_DEPLOYMENT_TYPE", dep.getType()));
- }
-
+
+ if (umd == null)
+ {
+ throw new IllegalStateException(BundleUtils.getMessage(bundle, "INVALID_DEPLOYMENT_TYPE", dep.getSimpleName()));
+ }
+
dep.addAttachment(UnifiedMetaData.class, umd);
}
13 years, 4 months
JBossWS SVN: r14950 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-07 22:57:21 -0400 (Wed, 07 Sep 2011)
New Revision: 14950
Added:
stack/native/branches/JBWS-3343/
Log:
Create workpace for JBWS-3343
13 years, 4 months
JBossWS SVN: r14949 - in common/branches/JBWS-3343/src/main/java/org/jboss/ws/common: management and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2011-09-07 22:41:47 -0400 (Wed, 07 Sep 2011)
New Revision: 14949
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/management/AbstractServerConfig.java
Log:
[JBWS-3346]:More fix for jaxrpc endpoint
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-08 02:37:01 UTC (rev 14948)
+++ common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/deployment/URLPatternDeploymentAspect.java 2011-09-08 02:41:47 UTC (rev 14949)
@@ -79,7 +79,7 @@
// #1 For JSE lookup the url-pattern from the servlet mappings
JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
- if (webMetaData != null && ep.getType() == EndpointType.JAXWS_JSE || ep.getType() == EndpointType.JAXRPC_JSE)
+ if (webMetaData != null && (ep.getType() == EndpointType.JAXWS_JSE || ep.getType() == EndpointType.JAXRPC_JSE))
{
String epName = ep.getShortName();
urlPattern = webMetaData.getServletMappings().get(epName);
@@ -90,15 +90,13 @@
// #2 Use the explicit urlPattern from port-component/port-component-uri
EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
//TODO: look at EndpointType.JAXRPC_EJB21
- if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null && ep.getType() == EndpointType.JAXWS_EJB3)
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName()) != null && (ep.getType() == EndpointType.JAXWS_EJB3 || ep.getType() == EndpointType.JAXRPC_EJB21))
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
urlPattern = bmd.getPortComponentURI();
if (urlPattern != null)
{
- //TODO:set contextRoot to eache endpoint
- //String contextRoot = dep.getService().getContextRoot();
- String contextRoot = null;
+ String contextRoot =dep.getService().getContextRoot();
if (urlPattern.startsWith("/") == false)
urlPattern = "/" + urlPattern;
Modified: common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-09-08 02:37:01 UTC (rev 14948)
+++ common/branches/JBWS-3343/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2011-09-08 02:41:47 UTC (rev 14949)
@@ -167,7 +167,7 @@
}
catch (WSFException e)
{
- log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"), e);
+ log.warn(BundleUtils.getMessage(bundle, "COULD_NOT_GET_WEBSERVERINFO"));
}
if (localPort <= 0)
{
13 years, 4 months