JBossWS SVN: r14987 - common/tags.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 08:41:16 -0400 (Mon, 12 Sep 2011)
New Revision: 14987
Added:
common/tags/jbossws-common-2.0.0.Beta8/
Log:
tagging JBossWS Common
13 years, 3 months
JBossWS SVN: r14984 - spi/tags.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 08:28:08 -0400 (Mon, 12 Sep 2011)
New Revision: 14984
Added:
spi/tags/jbossws-spi-2.0.0.Beta9/
Log:
tagging JBossWS SPI
13 years, 3 months
JBossWS SVN: r14982 - in stack/native/trunk: modules/dist and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 08:15:46 -0400 (Mon, 12 Sep 2011)
New Revision: 14982
Modified:
stack/native/trunk/modules/dist/pom.xml
stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/native/trunk/pom.xml
Log:
resuscitate JBossWS Native against AS700
Modified: stack/native/trunk/modules/dist/pom.xml
===================================================================
--- stack/native/trunk/modules/dist/pom.xml 2011-09-12 12:13:39 UTC (rev 14981)
+++ stack/native/trunk/modules/dist/pom.xml 2011-09-12 12:15:46 UTC (rev 14982)
@@ -124,6 +124,22 @@
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!--junit-->
<dependency>
<groupId>junit</groupId>
Modified: stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-09-12 12:13:39 UTC (rev 14981)
+++ stack/native/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-09-12 12:15:46 UTC (rev 14982)
@@ -92,6 +92,7 @@
<include>org.jboss.ws:jbossws-common-tools:jar</include>
<include>org.jboss.ws:jbossws-jboss600:jar</include>
<include>org.jboss.ws:jbossws-jboss610:jar</include>
+ <include>org.jboss.ws:jbossws-jboss700:jar</include>
<include>org.jboss:jbossxb:jar</include>
<include>org.jboss.as:jboss-as-webservices-tests-integration:jar</include>
</includes>
@@ -102,7 +103,7 @@
<dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
- <unpack>false</unpack>
+ <unpack>false</unpack>
<includes>
<include>org.jboss.ws:jbossws-shared-testsuite:jar</include>
</includes>
Modified: stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-09-12 12:13:39 UTC (rev 14981)
+++ stack/native/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-09-12 12:15:46 UTC (rev 14982)
@@ -393,6 +393,7 @@
<copy todir="@{targetdir}/org/jboss/as/webservices/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-native-resources.jar"/>
+ <include name="**/jbossws-jboss700.jar"/>
</fileset>
</copy>
<!-- module.xml files -->
@@ -457,6 +458,7 @@
<delete includeemptydirs="true" verbose="true">
<fileset dir="${jboss.modules}">
<include name="**/org/jboss/as/webservices/main/jbossws-*-resources*"/>
+ <include name="**/org/jboss/as/webservices/main/*7.0.0.Final*"/>
</fileset>
</delete>
Modified: stack/native/trunk/pom.xml
===================================================================
--- stack/native/trunk/pom.xml 2011-09-12 12:13:39 UTC (rev 14981)
+++ stack/native/trunk/pom.xml 2011-09-12 12:15:46 UTC (rev 14982)
@@ -51,6 +51,7 @@
<jbossws.shared.testsuite.version>4.0.0-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss600.version>4.0.0-SNAPSHOT</jbossws.jboss600.version>
<jbossws.jboss610.version>4.0.0-SNAPSHOT</jbossws.jboss610.version>
+ <jbossws.jboss700.version>4.0.0-SNAPSHOT</jbossws.jboss700.version>
<jboss700.version>7.0.0.Final</jboss700.version>
<ant.version>1.7.1</ant.version>
<codehaus.jettison.version>1.0-RC2</codehaus.jettison.version>
@@ -125,6 +126,11 @@
<type>zip</type>
</dependency>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <version>${jbossws.jboss700.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<version>${jboss700.version}</version>
13 years, 3 months
JBossWS SVN: r14981 - in stack/cxf/trunk: modules/dist and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 08:13:39 -0400 (Mon, 12 Sep 2011)
New Revision: 14981
Modified:
stack/cxf/trunk/modules/dist/pom.xml
stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
stack/cxf/trunk/pom.xml
Log:
resuscitate JBossWS CXF against AS700
Modified: stack/cxf/trunk/modules/dist/pom.xml
===================================================================
--- stack/cxf/trunk/modules/dist/pom.xml 2011-09-12 11:51:48 UTC (rev 14980)
+++ stack/cxf/trunk/modules/dist/pom.xml 2011-09-12 12:13:39 UTC (rev 14981)
@@ -151,6 +151,22 @@
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>sun-jaxb</groupId>
+ <artifactId>jaxb-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
<!--junit-->
<dependency>
<groupId>junit</groupId>
Modified: stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml
===================================================================
--- stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-09-12 11:51:48 UTC (rev 14980)
+++ stack/cxf/trunk/modules/dist/src/main/scripts/assembly-deploy-artifacts.xml 2011-09-12 12:13:39 UTC (rev 14981)
@@ -97,6 +97,7 @@
<include>org.jboss.ws:jbossws-common-tools:jar</include>
<include>org.jboss.ws:jbossws-jboss600:jar</include>
<include>org.jboss.ws:jbossws-jboss610:jar</include>
+ <include>org.jboss.ws:jbossws-jboss700:jar</include>
<include>org.jboss.as:jboss-as-webservices-tests-integration:jar</include>
</includes>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
@@ -125,8 +126,7 @@
<scope>test</scope>
<useProjectArtifact>false</useProjectArtifact>
</dependencySet>
-
- <dependencySet>
+ <dependencySet>
<outputDirectory>deploy-artifacts/lib</outputDirectory>
<unpack>false</unpack>
<outputFileNameMapping>wstx.jar</outputFileNameMapping>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-09-12 11:51:48 UTC (rev 14980)
+++ stack/cxf/trunk/modules/resources/src/main/resources/resources/jbossws-deploy-macros.xml 2011-09-12 12:13:39 UTC (rev 14981)
@@ -397,6 +397,7 @@
<copy todir="@{targetdir}/org/jboss/as/webservices/main" flatten="false" overwrite="true">
<fileset dir="@{thirdpartydir}/lib">
<include name="**/jbossws-cxf-resources.jar"/>
+ <include name="**/jbossws-jboss700.jar"/>
</fileset>
</copy>
<!-- module.xml files -->
@@ -519,6 +520,7 @@
<delete includeemptydirs="true" verbose="true">
<fileset dir="${jboss.modules}">
<include name="**/org/jboss/as/webservices/main/jbossws-*-resources*"/>
+ <include name="**/org/jboss/as/webservices/main/*7.0.0.Final*"/>
</fileset>
</delete>
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2011-09-12 11:51:48 UTC (rev 14980)
+++ stack/cxf/trunk/pom.xml 2011-09-12 12:13:39 UTC (rev 14981)
@@ -52,6 +52,7 @@
<jbossws.shared.testsuite.version>4.0.0-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss600.version>4.0.0-SNAPSHOT</jbossws.jboss600.version>
<jbossws.jboss610.version>4.0.0-SNAPSHOT</jbossws.jboss610.version>
+ <jbossws.jboss700.version>4.0.0-SNAPSHOT</jbossws.jboss700.version>
<jboss700.version>7.0.0.Final</jboss700.version>
<cxf.version>2.4.3-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3</cxf.asm.version>
@@ -148,6 +149,11 @@
<type>zip</type>
</dependency>
<dependency>
+ <groupId>org.jboss.ws</groupId>
+ <artifactId>jbossws-jboss700</artifactId>
+ <version>${jbossws.jboss700.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-webservices-tests-integration</artifactId>
<version>${jboss700.version}</version>
13 years, 3 months
JBossWS SVN: r14980 - container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 07:51:48 -0400 (Mon, 12 Sep 2011)
New Revision: 14980
Modified:
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSModelDeploymentProcessor.java
Log:
fix broken AS7 ASIL
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSModelDeploymentProcessor.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSModelDeploymentProcessor.java 2011-09-12 09:39:03 UTC (rev 14979)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSModelDeploymentProcessor.java 2011-09-12 11:51:48 UTC (rev 14980)
@@ -39,10 +39,7 @@
@Override
public void internalDeploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
final DeploymentUnit unit = phaseContext.getDeploymentUnit();
- if (ASHelper.isWebServiceDeployment(unit)) {
- //create new Web Service deployment and register it with deployment unit
- WSDeploymentBuilder.getInstance().build(unit);
- }
+ WSDeploymentBuilder.getInstance().build(unit);
}
@Override
13 years, 3 months
JBossWS SVN: r14979 - in container/jboss70/branches/jbossws-jboss700: src/main/java/org/jboss/as/webservices/deployers and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2011-09-12 05:39:03 -0400 (Mon, 12 Sep 2011)
New Revision: 14979
Removed:
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSTypeDeploymentProcessor.java
Modified:
container/jboss70/branches/jbossws-jboss700/pom.xml
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/WSDeploymentBuilder.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/ASHelper.java
container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/WSAttachmentKeys.java
Log:
resuscitate AS 700 ASIL & sync with latest SPI
Modified: container/jboss70/branches/jbossws-jboss700/pom.xml
===================================================================
--- container/jboss70/branches/jbossws-jboss700/pom.xml 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/pom.xml 2011-09-12 09:39:03 UTC (rev 14979)
@@ -25,9 +25,9 @@
<!-- Properties -->
<properties>
- <jbossws.api.version>1.0.0.Beta1</jbossws.api.version>
- <jbossws.spi.version>2.0.0.Beta5</jbossws.spi.version>
- <jbossws.common.version>2.0.0.Beta4</jbossws.common.version>
+ <jbossws.api.version>1.0.0-SNAPSHOT</jbossws.api.version>
+ <jbossws.spi.version>2.0.0-SNAPSHOT</jbossws.spi.version>
+ <jbossws.common.version>2.0.0-SNAPSHOT</jbossws.common.version>
<jboss.msc.version>1.0.0.GA</jboss.msc.version>
<jboss.version>7.0.0.Final</jboss.version>
</properties>
Deleted: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSTypeDeploymentProcessor.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSTypeDeploymentProcessor.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/WSTypeDeploymentProcessor.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -1,119 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, 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.as.webservices.deployers;
-
-import org.jboss.as.server.deployment.DeploymentPhaseContext;
-import org.jboss.as.server.deployment.DeploymentUnit;
-import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
-import org.jboss.as.server.deployment.DeploymentUnitProcessor;
-import org.jboss.as.web.deployment.WarMetaData;
-import org.jboss.as.webservices.util.ASHelper;
-import org.jboss.as.webservices.util.WSAttachmentKeys;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-
-/**
- * Detects Web Service deployment type.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:alessio.soldano@jboss.com">Alessio Soldano</a>
- */
-public final class WSTypeDeploymentProcessor implements DeploymentUnitProcessor {
-
- @Override
- public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
- final DeploymentUnit unit = phaseContext.getDeploymentUnit();
- if (this.isJaxwsJseDeployment(unit)) {
- unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_TYPE_KEY, DeploymentType.JAXWS_JSE);
- } else if (this.isJaxwsEjbDeployment(unit)) {
- unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_TYPE_KEY, DeploymentType.JAXWS_EJB3);
- } else if (this.isJaxrpcJseDeployment(unit)) {
- unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_TYPE_KEY, DeploymentType.JAXRPC_JSE);
- } else if (this.isJaxrpcEjbDeployment(unit)) {
- unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_TYPE_KEY, DeploymentType.JAXRPC_EJB21);
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit context) {
- //NOOP
- }
-
- /**
- * Returns true if JAXRPC EJB deployment is detected.
- *
- * @param unit deployment unit
- * @return true if JAXRPC EJB, false otherwise
- */
- private boolean isJaxrpcEjbDeployment(final DeploymentUnit unit) {
- //TODO
-// final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, AttachmentKeys.WEBSERVICES_METADATA_KEY);
-// final boolean hasJBossMD = unit.getAllMetaData(JBossMetaData.class).size() > 0;
-//
-// return hasWebservicesMD && hasJBossMD;
- return false;
- }
-
- /**
- * Returns true if JAXRPC JSE deployment is detected.
- *
- * @param unit deployment unit
- * @return true if JAXRPC JSE, false otherwise
- */
- private boolean isJaxrpcJseDeployment(final DeploymentUnit unit) {
- final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, WSAttachmentKeys.WEBSERVICES_METADATA_KEY);
- final boolean hasJBossWebMD = ASHelper.getJBossWebMetaData(unit) != null;
-
- if (hasWebservicesMD && hasJBossWebMD) {
- return ASHelper.getJaxrpcServlets(unit).size() > 0;
- }
-
- return false;
- }
-
- /**
- * Returns true if JAXWS EJB deployment is detected.
- *
- * @param unit deployment unit
- * @return true if JAXWS EJB, false otherwise
- */
- private boolean isJaxwsEjbDeployment(final DeploymentUnit unit) {
- return ASHelper.hasAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY);
- }
-
- /**
- * Returns true if JAXWS JSE deployment is detected.
- *
- * @param unit deployment unit
- * @return true if JAXWS JSE, false otherwise
- */
- private boolean isJaxwsJseDeployment(final DeploymentUnit unit) {
- final boolean hasWarMetaData = ASHelper.hasAttachment(unit, WarMetaData.ATTACHMENT_KEY);
- if (hasWarMetaData) {
- //once the deployment is a WAR, the endpoint(s) can be on either http (servlet) transport or jms transport
- return ASHelper.getJaxwsServlets(unit).size() > 0 || ASHelper.hasAttachment(unit, WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY);
- } else {
- //otherwise the (JAR) deployment can be a jaxws_jse one if there're jms transport endpoints only (no ejb3)
- return !ASHelper.hasAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY) &&
- ASHelper.hasAttachment(unit, WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY);
- }
- }
-}
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/AbstractDeploymentModelBuilder.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,6 +21,8 @@
*/
package org.jboss.as.webservices.deployers.deployment;
+import static org.jboss.as.webservices.util.WSAttachmentKeys.DEPLOYMENT_KEY;
+
import java.io.IOException;
import java.util.HashSet;
import java.util.LinkedList;
@@ -33,7 +35,6 @@
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
import org.jboss.as.server.deployment.module.ResourceRoot;
import org.jboss.as.webservices.util.ASHelper;
-import org.jboss.as.webservices.util.WSAttachmentKeys;
import org.jboss.as.webservices.util.VirtualFileAdaptor;
import org.jboss.logging.Logger;
import org.jboss.modules.Module;
@@ -42,9 +43,10 @@
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.DeploymentType;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.EndpointType;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
/**
@@ -62,16 +64,24 @@
/** Deployment model factory. */
private final DeploymentModelFactory deploymentModelFactory;
+
+ /** Deployment type this builder creates. */
+ private final DeploymentType deploymentType;
+
+ /** Endpoint type this builder creates. */
+ private final EndpointType endpointType;
/**
* Constructor.
*/
- protected AbstractDeploymentModelBuilder() {
+ protected AbstractDeploymentModelBuilder(final DeploymentType deploymentType, final EndpointType endpointType) {
super();
// deployment factory
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
+ this.deploymentType = deploymentType;
+ this.endpointType = endpointType;
}
/**
@@ -80,17 +90,23 @@
* @param unit deployment unit
*/
public final void newDeploymentModel(final DeploymentUnit unit) {
- final ArchiveDeployment dep;
- try {
- dep = this.newDeployment(unit);
- } catch (DeploymentUnitProcessingException e) {
- throw new RuntimeException(e);
- }
+ final ArchiveDeployment dep;
+ if (unit.hasAttachment(DEPLOYMENT_KEY))
+ {
+ dep = (ArchiveDeployment) unit.getAttachment(DEPLOYMENT_KEY);
+ }
+ else
+ {
+ try {
+ dep = this.newDeployment(unit);
+ } catch (DeploymentUnitProcessingException e) {
+ throw new RuntimeException(e);
+ }
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.putAttachment(DEPLOYMENT_KEY, dep);
+ }
- this.build(dep, unit);
-
- dep.addAttachment(DeploymentUnit.class, unit);
- unit.putAttachment(WSAttachmentKeys.DEPLOYMENT_KEY, dep);
+ this.build(dep, unit);
}
/**
@@ -120,6 +136,7 @@
final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass);
endpoint.setShortName(endpointName);
+ endpoint.setType(endpointType);
dep.getService().addEndpoint(endpoint);
return endpoint;
@@ -145,6 +162,7 @@
final Endpoint endpoint = this.deploymentModelFactory.newJMSEndpoint(endpointClass);
endpoint.setAddress(soapAddress);
endpoint.setShortName(endpointName);
+ endpoint.setType(endpointType);
dep.getService().addEndpoint(endpoint);
return endpoint;
@@ -195,7 +213,6 @@
dep.setRootFile(new VirtualFileAdaptor(root));
dep.setRuntimeClassLoader(classLoader);
- final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.DEPLOYMENT_TYPE_KEY);
dep.setType(deploymentType);
return dep;
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,6 +21,9 @@
*/
package org.jboss.as.webservices.deployers.deployment;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
+import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_EJB21;
+
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.as.webservices.metadata.WebServiceDeployment;
@@ -34,11 +37,12 @@
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
final class DeploymentModelBuilderJAXRPC_EJB21 extends AbstractDeploymentModelBuilder {
+
/**
* Constructor.
*/
DeploymentModelBuilderJAXRPC_EJB21() {
- super();
+ super(JAXRPC, JAXRPC_EJB21);
}
/**
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,6 +21,9 @@
*/
package org.jboss.as.webservices.deployers.deployment;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXRPC;
+import static org.jboss.wsf.spi.deployment.EndpointType.JAXRPC_JSE;
+
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSAttachmentKeys;
@@ -41,7 +44,7 @@
* Constructor.
*/
DeploymentModelBuilderJAXRPC_JSE() {
- super();
+ super(JAXRPC, JAXRPC_JSE);
}
/**
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,6 +21,9 @@
*/
package org.jboss.as.webservices.deployers.deployment;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
+import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_EJB3;
+
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.webservices.util.ASHelper;
import org.jboss.as.webservices.util.WSAttachmentKeys;
@@ -40,7 +43,7 @@
* Constructor.
*/
DeploymentModelBuilderJAXWS_EJB3() {
- super();
+ super(JAXWS, JAXWS_EJB3);
}
/**
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,6 +21,9 @@
*/
package org.jboss.as.webservices.deployers.deployment;
+import static org.jboss.wsf.spi.deployment.DeploymentType.JAXWS;
+import static org.jboss.wsf.spi.deployment.EndpointType.JAXWS_JSE;
+
import java.util.List;
import org.jboss.as.server.deployment.DeploymentUnit;
@@ -42,7 +45,7 @@
* Constructor.
*/
DeploymentModelBuilderJAXWS_JSE() {
- super();
+ super(JAXWS, JAXWS_JSE);
}
/**
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/WSDeploymentBuilder.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/WSDeploymentBuilder.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/deployers/deployment/WSDeploymentBuilder.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -21,13 +21,13 @@
*/
package org.jboss.as.webservices.deployers.deployment;
-import java.util.HashMap;
-import java.util.Map;
+import static org.jboss.as.webservices.util.ASHelper.isJaxrpcEjbDeployment;
+import static org.jboss.as.webservices.util.ASHelper.isJaxrpcJseDeployment;
+import static org.jboss.as.webservices.util.ASHelper.isJaxwsEjbDeployment;
+import static org.jboss.as.webservices.util.ASHelper.isJaxwsJseDeployment;
import org.jboss.as.server.deployment.DeploymentUnit;
-import org.jboss.as.webservices.util.ASHelper;
-import org.jboss.as.webservices.util.WSAttachmentKeys;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.logging.Logger;
/**
* JBossWS deployment model builder.
@@ -35,19 +35,14 @@
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
public final class WSDeploymentBuilder {
- /** Builder instance. */
+ private static final Logger log = Logger.getLogger(WSDeploymentBuilder.class);
private static final WSDeploymentBuilder SINGLETON = new WSDeploymentBuilder();
- /** Builders registry. */
- private static final Map<DeploymentType, DeploymentModelBuilder> builders = new HashMap<DeploymentType, DeploymentModelBuilder>();;
+ private static final DeploymentModelBuilder JAXWS_JSE = new DeploymentModelBuilderJAXWS_JSE();
+ private static final DeploymentModelBuilder JAXRPC_JSE = new DeploymentModelBuilderJAXRPC_JSE();
+ private static final DeploymentModelBuilder JAXWS_EJB = new DeploymentModelBuilderJAXWS_EJB3();
+ private static final DeploymentModelBuilder JAXRPC_EJB = new DeploymentModelBuilderJAXRPC_EJB21();
- 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());
- }
-
/**
* Constructor.
*/
@@ -70,10 +65,28 @@
* @param unit deployment unit
*/
public void build(final DeploymentUnit unit) {
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, WSAttachmentKeys.DEPLOYMENT_TYPE_KEY);
-
- if (deploymentType != null) {
- WSDeploymentBuilder.builders.get(deploymentType).newDeploymentModel(unit);
- }
+ boolean isJaxwsDeployment = false;
+ if (isJaxwsJseDeployment(unit))
+ {
+ log.debug("Detected JAXWS JSE deployment");
+ JAXWS_JSE.newDeploymentModel(unit);
+ isJaxwsDeployment = true;
+ }
+ if (isJaxwsEjbDeployment(unit))
+ {
+ log.debug("Detected JAXWS EJB3 deployment");
+ JAXWS_EJB.newDeploymentModel(unit);
+ isJaxwsDeployment = true;
+ }
+ if (!isJaxwsDeployment && isJaxrpcJseDeployment(unit))
+ {
+ log.debug("Detected JAXRPC JSE deployment");
+ JAXRPC_JSE.newDeploymentModel(unit);
+ }
+ if (!isJaxwsDeployment && isJaxrpcEjbDeployment(unit))
+ {
+ log.debug("Detected JAXRPC EJB21 deployment");
+ JAXRPC_EJB.newDeploymentModel(unit);
+ }
}
}
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/dmr/WSDeploymentActivator.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -31,7 +31,6 @@
import org.jboss.as.webservices.deployers.WSEJBIntegrationProcessor;
import org.jboss.as.webservices.deployers.WSJMSIntegrationProcessor;
import org.jboss.as.webservices.deployers.WSModelDeploymentProcessor;
-import org.jboss.as.webservices.deployers.WSTypeDeploymentProcessor;
import org.jboss.as.webservices.deployers.WebServiceContextResourceProcessor;
import org.jboss.as.webservices.parser.WSDeploymentAspectParser;
import org.jboss.logging.Logger;
@@ -61,7 +60,6 @@
processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_WS, new WSDependenciesProcessor());
processorTarget.addDeploymentProcessor(Phase.POST_MODULE, Phase.POST_MODULE_WS_JMS_INTEGRATION, new WSJMSIntegrationProcessor());
//processorTarget.addDeploymentProcessor(Phase.DEPENDENCIES, Phase.DEPENDENCIES_JAXRPC, new WSJAXRPCDependenciesDeploymentProcessor());
- processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WS_DEPLOYMENT_TYPE_DETECTOR, new WSTypeDeploymentProcessor());
processorTarget.addDeploymentProcessor(Phase.INSTALL, Phase.INSTALL_WS_UNIVERSAL_META_DATA_MODEL, new WSModelDeploymentProcessor());
addDeploymentProcessors(processorTarget, Phase.INSTALL, Phase.INSTALL_WS_DEPLOYMENT_ASPECTS);
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/ASHelper.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/ASHelper.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/ASHelper.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -82,7 +82,7 @@
* @return true if JAXWS JSE, JAXRPC JSE, JAXWS EJB or JAXRPC EJB deployment, false otherwise.
*/
public static boolean isWebServiceDeployment(final DeploymentUnit unit) {
- return ASHelper.getOptionalAttachment(unit, WSAttachmentKeys.DEPLOYMENT_TYPE_KEY) != null;
+ return getOptionalAttachment(unit, WSAttachmentKeys.DEPLOYMENT_KEY) != null;
}
/**
@@ -92,7 +92,7 @@
* @return list of JAXWS servlets meta data
*/
public static List<ServletMetaData> getJaxwsServlets(final DeploymentUnit unit) {
- return ASHelper.getWebServiceServlets(unit, true);
+ return getWebServiceServlets(unit, true);
}
/**
@@ -102,7 +102,7 @@
* @return list of JAXRPC servlets meta data
*/
public static List<ServletMetaData> getJaxrpcServlets(final DeploymentUnit unit) {
- return ASHelper.getWebServiceServlets(unit, false);
+ return getWebServiceServlets(unit, false);
}
/**
@@ -112,7 +112,7 @@
* @return list of JAXWS EJBs meta data
*/
public static List<WebServiceDeclaration> getJaxwsEjbs(final DeploymentUnit unit) {
- final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY);
+ final WebServiceDeployment wsDeployment = getRequiredAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY);
return Collections.unmodifiableList(wsDeployment.getServiceEndpoints());
}
@@ -158,7 +158,7 @@
public static <A> A getRequiredAttachment(final DeploymentUnit unit, final AttachmentKey<A> key) {
final A value = unit.getAttachment(key);
if (value == null) {
- ASHelper.LOGGER.error("Cannot find attachment in deployment unit: " + key);
+ LOGGER.error("Cannot find attachment in deployment unit: " + key);
throw new IllegalStateException();
}
@@ -185,7 +185,7 @@
* @return true if contains attachment, false otherwise
*/
public static boolean hasAttachment(final DeploymentUnit unit, final AttachmentKey<?> key) {
- return ASHelper.getOptionalAttachment(unit, key) != null;
+ return getOptionalAttachment(unit, key) != null;
}
/**
@@ -198,7 +198,7 @@
final WebserviceDescriptionsMetaData wsDescriptionsMD) {
if (wsDescriptionsMD != null) {
if (wsDescriptionsMD.size() > 1) {
- ASHelper.LOGGER.warn("Multiple <webservice-description> elements not supported");
+ LOGGER.warn("Multiple <webservice-description> elements not supported");
}
if (wsDescriptionsMD.size() > 0) {
@@ -218,7 +218,7 @@
*/
private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws) {
final JBossWebMetaData jbossWebMD = getJBossWebMetaData(unit);
- final CompositeIndex compositeIndex = ASHelper.getRequiredAttachment(unit, Attachments.COMPOSITE_ANNOTATION_INDEX);
+ final CompositeIndex compositeIndex = getRequiredAttachment(unit, Attachments.COMPOSITE_ANNOTATION_INDEX);
return selectWebServiceServlets(compositeIndex, jbossWebMD.getServlets(), jaxws);
}
@@ -249,7 +249,7 @@
}
private static boolean isWebserviceEndpoint(final ServletMetaData servletMD, final CompositeIndex index) {
- final String endpointClassName = ASHelper.getEndpointName(servletMD);
+ final String endpointClassName = getEndpointName(servletMD);
if (isJSP(endpointClassName)) return false;
final DotName endpointDotName = DotName.createSimple(endpointClassName);
final ClassInfo endpointClassInfo = index.getClassByName(endpointDotName);
@@ -275,7 +275,7 @@
* @return the JBossWebMetaData or null if either that or the parent WarMetaData are not found.
*/
public static JBossWebMetaData getJBossWebMetaData(final DeploymentUnit unit) {
- final WarMetaData warMetaData = ASHelper.getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
+ final WarMetaData warMetaData = getOptionalAttachment(unit, WarMetaData.ATTACHMENT_KEY);
JBossWebMetaData result = null;
if (warMetaData != null) {
result = warMetaData.getMergedJBossWebMetaData();
@@ -287,7 +287,68 @@
}
public static List<AnnotationInstance> getAnnotations(final DeploymentUnit unit, final DotName annotation) {
- final CompositeIndex compositeIndex = ASHelper.getRequiredAttachment(unit, Attachments.COMPOSITE_ANNOTATION_INDEX);
+ final CompositeIndex compositeIndex = getRequiredAttachment(unit, Attachments.COMPOSITE_ANNOTATION_INDEX);
return compositeIndex.getAnnotations(annotation);
}
+
+ /**
+ * Returns true if JAXRPC EJB deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXRPC EJB, false otherwise
+ */
+ public static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit) {
+ //TODO
+// final boolean hasWebservicesMD = hasAttachment(unit, AttachmentKeys.WEBSERVICES_METADATA_KEY);
+// final boolean hasJBossMD = unit.getAllMetaData(JBossMetaData.class).size() > 0;
+//
+// return hasWebservicesMD && hasJBossMD;
+ return false;
+ }
+
+ /**
+ * Returns true if JAXRPC JSE deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXRPC JSE, false otherwise
+ */
+ public static boolean isJaxrpcJseDeployment(final DeploymentUnit unit) {
+ final boolean hasWebservicesMD = hasAttachment(unit, WSAttachmentKeys.WEBSERVICES_METADATA_KEY);
+ final boolean hasJBossWebMD = getJBossWebMetaData(unit) != null;
+
+ if (hasWebservicesMD && hasJBossWebMD) {
+ return getJaxrpcServlets(unit).size() > 0;
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns true if JAXWS EJB deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXWS EJB, false otherwise
+ */
+ public static boolean isJaxwsEjbDeployment(final DeploymentUnit unit) {
+ return hasAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY);
+ }
+
+ /**
+ * Returns true if JAXWS JSE deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXWS JSE, false otherwise
+ */
+ public static boolean isJaxwsJseDeployment(final DeploymentUnit unit) {
+ final boolean hasWarMetaData = hasAttachment(unit, WarMetaData.ATTACHMENT_KEY);
+ if (hasWarMetaData) {
+ //once the deployment is a WAR, the endpoint(s) can be on either http (servlet) transport or jms transport
+ return getJaxwsServlets(unit).size() > 0 || hasAttachment(unit, WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY);
+ } else {
+ //otherwise the (JAR) deployment can be a jaxws_jse one if there're jms transport endpoints only (no ejb3)
+ return !hasAttachment(unit, WSAttachmentKeys.WEBSERVICE_DEPLOYMENT_KEY) &&
+ hasAttachment(unit, WSAttachmentKeys.JMS_ENDPOINT_METADATA_KEY);
+ }
+ }
+
}
Modified: container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/WSAttachmentKeys.java
===================================================================
--- container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/WSAttachmentKeys.java 2011-09-12 09:25:32 UTC (rev 14978)
+++ container/jboss70/branches/jbossws-jboss700/src/main/java/org/jboss/as/webservices/util/WSAttachmentKeys.java 2011-09-12 09:39:03 UTC (rev 14979)
@@ -24,7 +24,6 @@
import org.jboss.as.server.deployment.AttachmentKey;
import org.jboss.metadata.ear.jboss.JBossAppMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.as.webservices.metadata.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
@@ -38,7 +37,6 @@
public final class WSAttachmentKeys {
public static final AttachmentKey<Deployment> DEPLOYMENT_KEY = AttachmentKey.create(Deployment.class);
- public static final AttachmentKey<DeploymentType> DEPLOYMENT_TYPE_KEY = AttachmentKey.create(DeploymentType.class);
public static final AttachmentKey<JBossAppMetaData> JBOSS_APP_METADATA_KEY = AttachmentKey.create(JBossAppMetaData.class);
public static final AttachmentKey<JMSEndpointsMetaData> JMS_ENDPOINT_METADATA_KEY = AttachmentKey.create(JMSEndpointsMetaData.class);
public static final AttachmentKey<WebServiceDeployment> WEBSERVICE_DEPLOYMENT_KEY = AttachmentKey.create(WebServiceDeployment.class);
13 years, 3 months