Author: richard.opalka(a)jboss.com
Date: 2010-07-09 07:04:05 -0400 (Fri, 09 Jul 2010)
New Revision: 12614
Added:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
Modified:
container/jboss60/branches/jbossws-jboss600M3/pom.xml
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
container/jboss60/branches/jbossws-jboss600M3/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-3086] merging JMS CXF prototype upstream + some refactorings on DD parsers - see
processor classes
Modified: container/jboss60/branches/jbossws-jboss600M3/pom.xml
===================================================================
--- container/jboss60/branches/jbossws-jboss600M3/pom.xml 2010-07-09 10:07:15 UTC (rev
12613)
+++ container/jboss60/branches/jbossws-jboss600M3/pom.xml 2010-07-09 11:04:05 UTC (rev
12614)
@@ -130,6 +130,11 @@
<artifactId>hornetq-jms-client</artifactId>
<version>${jboss.hornetq.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ <version>${jboss.hornetq.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -211,6 +216,10 @@
<artifactId>hornetq-jms-client</artifactId>
</dependency>
<dependency>
+ <groupId>org.hornetq</groupId>
+ <artifactId>hornetq-jms</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata-common</artifactId>
</dependency>
Added:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/AbstractDescriptorDeployer.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.vfs.spi.deployer.ObjectModelFactoryDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.vfs.VFSInputSource;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.wsf.spi.metadata.DescriptorProcessor;
+import org.jboss.xb.binding.ObjectModelFactory;
+import org.xml.sax.InputSource;
+
+/**
+ * Abstract descriptor deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+abstract class AbstractDescriptorDeployer<P extends DescriptorProcessor<T>,
T> extends ObjectModelFactoryDeployer<T>
+{
+ private P ddProcessor;
+
+ AbstractDescriptorDeployer(Class<T> output)
+ {
+ super(output);
+ this.setName("UNSPECIFIED");
+ this.setUseSchemaValidation(false);
+ }
+
+ @Override
+ protected T parse(final VFSDeploymentUnit unit, final VirtualFile file, final T root)
throws Exception
+ {
+ if (this.ddProcessor != null)
+ {
+ InputSource source = new VFSInputSource(file);
+ ObjectModelFactory factory = this.ddProcessor.getFactory(file.toURL());
+ return getHelper().parse(source, root, factory);
+ }
+
+ return null;
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time subclass specific
DescriptorProcessor bean will be installed.
+ */
+ protected void setProcessor(final P ddProcessor)
+ {
+ if (this.ddProcessor != null)
+ throw new IllegalStateException("Only one " +
this.ddProcessor.getClass() + " instance can be installed in MC");
+
+ this.ddProcessor = ddProcessor;
+ this.setName(this.ddProcessor.getDescriptorName());
+ this.setUseSchemaValidation(this.ddProcessor.isValidating());
+ }
+
+ @Override
+ protected ObjectModelFactory getObjectModelFactory(final T root)
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Added:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/JMSDescriptorDeployer.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.wsf.spi.metadata.jms.JMSDescriptorProcessor;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+
+/**
+ * Stack agnostic JMS descriptor deployer.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class JMSDescriptorDeployer extends
AbstractDescriptorDeployer<JMSDescriptorProcessor, JMSEndpointsMetaData>
+{
+ /**
+ * Constructor.
+ */
+ public JMSDescriptorDeployer()
+ {
+ super(JMSEndpointsMetaData.class);
+ }
+
+ /**
+ * MC incallback method. It will be invoked each time JMSDescriptorProcessor bean will
be installed.
+ * @param processor the processor
+ */
+ @Override
+ public void setProcessor(final JMSDescriptorProcessor processor)
+ {
+ super.setProcessor(processor);
+ }
+}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -23,11 +23,13 @@
import java.util.Set;
+import org.jboss.beans.metadata.spi.BeanMetaData;
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.util.ASHelper;
+import org.jboss.wsf.common.integration.JMSDeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -56,15 +58,29 @@
WSDeploymentAspectDeployer(final DeploymentAspect aspect)
{
super();
-
- // inputs
- this.addInput(JBossWebMetaData.class);
- this.addInput(Deployment.class);
- if (aspect.isLast())
+ if (aspect instanceof JMSDeploymentAspect)
{
- this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ // inputs
+ this.addInput(org.jboss.system.metadata.ServiceDeployment.class);
+ this.addInput(org.jboss.system.metadata.ServiceMetaData.class);
}
+ else
+ {
+ // inputs
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(Deployment.class);
+ if (aspect.isLast())
+ {
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ }
+ // outputs
+ this.addOutput(JBossWebMetaData.class);
+ if (!aspect.isLast())
+ {
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
+ }
+ }
// propagate DA requirements and map them to deployer inputs
final Set<String> inputs = aspect.getRequiresAsSet();
for (String input : inputs)
@@ -72,13 +88,6 @@
this.addInput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input);
}
- // outputs
- this.addOutput(JBossWebMetaData.class);
- if (!aspect.isLast())
- {
- this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
- }
-
// propagate DA provides and map them to deployer outputs
final Set<String> outputs = aspect.getProvidesAsSet();
for (String output : outputs)
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -21,19 +21,16 @@
*/
package org.jboss.webservices.integration.deployers;
-import org.jboss.deployers.vfs.spi.deployer.ObjectModelFactoryDeployer;
-import org.jboss.wsf.spi.metadata.webservices.WebservicesFactory;
+import org.jboss.wsf.spi.metadata.webservices.WebservicesDescriptorProcessor;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
/**
* webservices.xml deployer.
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class WSDescriptorDeployer extends
ObjectModelFactoryDeployer<WebservicesMetaData>
+public final class WSDescriptorDeployer extends
AbstractDescriptorDeployer<WebservicesDescriptorProcessor, WebservicesMetaData>
{
-
/**
* Constructor.
*/
@@ -41,18 +38,14 @@
{
super(WebservicesMetaData.class);
}
-
+
/**
- * Model factory generator.
- *
- * @param root object tree root
- * @return object model factory
+ * MC incallback method. It will be invoked each time WebservicesDescriptorProcessor
bean will be installed.
+ * @param processor the processor
*/
@Override
- protected ObjectModelFactory getObjectModelFactory(final WebservicesMetaData root)
+ public void setProcessor(final WebservicesDescriptorProcessor processor)
{
- this.log.debug("Returning webservices descriptor factory");
- return new WebservicesFactory(null);
+ super.setProcessor(processor);
}
-
}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -29,6 +29,7 @@
import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
/**
@@ -85,6 +86,11 @@
this.log.debug("Detected JAXRPC EJB21 deployment");
unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
}
+ else if (this.isJaxwsJmsDeployment(unit))
+ {
+ this.log.debug("Detected JAXWS JMS deployment");
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JMS);
+ }
}
/**
@@ -156,4 +162,15 @@
return false;
}
+ /**
+ * Returns true if JAXWS JMS deployment is detected.
+ *
+ * @param unit deployment unit
+ * @return true if JAXWS JMS, false otherwise
+ */
+ private boolean isJaxwsJmsDeployment(final DeploymentUnit unit)
+ {
+ return ASHelper.hasAttachment(unit, JMSEndpointsMetaData.class);
+ }
+
}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/AbstractDeploymentModelBuilder.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -76,14 +76,14 @@
protected abstract void build(Deployment dep, DeploymentUnit unit);
/**
- * Creates new Web Service endpoint.
+ * Creates new Http Web Service endpoint.
*
* @param endpointClass endpoint class name
* @param endpointName endpoint name
* @param dep deployment
* @return WS endpoint
*/
- protected final Endpoint newEndpoint(final String endpointClass, final String
endpointName, final Deployment dep)
+ protected final Endpoint newHttpEndpoint(final String endpointClass, final String
endpointName, final Deployment dep)
{
if (endpointName == null)
{
@@ -95,7 +95,7 @@
throw new NullPointerException("Null endpoint class");
}
- final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+ final Endpoint endpoint =
this.deploymentModelFactory.newHttpEndpoint(endpointClass);
endpoint.setShortName(endpointName);
dep.getService().addEndpoint(endpoint);
@@ -103,6 +103,33 @@
}
/**
+ * Creates new JMS Web Service endpoint.
+ *
+ * @param endpointClass endpoint class name
+ * @param endpointName endpoint name
+ * @param dep deployment
+ * @return WS endpoint
+ */
+ protected final Endpoint newJMSEndpoint(final String endpointClass, final String
endpointName, final Deployment dep)
+ {
+ if (endpointName == null)
+ {
+ throw new NullPointerException("Null endpoint name");
+ }
+
+ if (endpointClass == null)
+ {
+ throw new NullPointerException("Null endpoint class");
+ }
+
+ final Endpoint endpoint =
this.deploymentModelFactory.newJMSEndpoint(endpointClass);
+ endpoint.setShortName(endpointName);
+ dep.getService().addEndpoint(endpoint);
+
+ return endpoint;
+ }
+
+ /**
* Creates new Web Service deployment.
*
* @param unit deployment unit
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_EJB21.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -49,7 +49,7 @@
final String ejbClass = beanMetaData.getEjbClass();
this.log.debug("EJB21 class: " + ejbClass);
- this.newEndpoint(ejbClass, ejbName, dep);
+ this.newHttpEndpoint(ejbClass, ejbName, dep);
}
}
}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXRPC_JSE.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -48,7 +48,7 @@
final String servletClass = ASHelper.getEndpointName(servletMD);
this.log.debug("JSE class: " + servletClass);
- this.newEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep);
}
}
}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_EJB3.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -44,7 +44,7 @@
final String ejbClass = container.getComponentClassName();
this.log.debug("EJB3 class: " + ejbClass);
- final Endpoint ep = this.newEndpoint(ejbClass, ejbName, dep);
+ final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep);
ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
}
}
Copied:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
(from rev 12282,
container/jboss60/branches/jbossws-jboss600M3-jms-integration/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java)
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java
(rev 0)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JMS.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.deployment;
+
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+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.metadata.jms.JMSEndpointMetaData;
+import org.jboss.wsf.spi.metadata.jms.JMSEndpointsMetaData;
+
+/**
+ * Create JAXWS SPI Deployment for JAXWS_JMS type deployment
+ * @author <a herf="ema(a)redhat.com>Jim Ma</a>
+ *
+ */
+public class DeploymentModelBuilderJAXWS_JMS extends AbstractDeploymentModelBuilder
+{
+
+ /**
+ * Constructor.
+ */
+ DeploymentModelBuilderJAXWS_JMS()
+ {
+ super();
+ }
+
+ /**
+ * Creates new JAXWS JMS deployment and registers it with deployment unit.
+ *
+ * @param dep webservice deployment
+ * @param unit deployment unit
+ */
+ @Override
+ protected void build(final Deployment dep, final DeploymentUnit unit)
+ {
+ this.getAndPropagateAttachment(JMSEndpointsMetaData.class, unit, dep);
+ JMSEndpointsMetaData jmsEndpointsMD =
dep.getAttachment(JMSEndpointsMetaData.class);
+ for (JMSEndpointMetaData endpoint : jmsEndpointsMD.getEndpointsMetaData())
+ {
+ if (endpoint.getName() == null)
+ {
+ endpoint.setName(endpoint.getImplementor());
+ }
+ this.newJMSEndpoint(endpoint.getImplementor(), endpoint.getName(), dep);
+ }
+ }
+
+ }
\ No newline at end of file
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/DeploymentModelBuilderJAXWS_JSE.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -44,7 +44,7 @@
final String servletClass = ASHelper.getEndpointName(servlet);
this.log.debug("JSE class: " + servletClass);
- this.newEndpoint(servletClass, servletName, dep);
+ this.newHttpEndpoint(servletClass, servletName, dep);
}
}
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/deployers/deployment/WSDeploymentBuilder.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -48,6 +48,7 @@
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(DeploymentType.JAXWS_JMS, new
DeploymentModelBuilderJAXWS_JMS());
}
/**
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-07-09
11:04:05 UTC (rev 12614)
@@ -36,6 +36,7 @@
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.HttpEndpoint;
/**
* Creator of web app meta data for EJB endpoints.
@@ -185,7 +186,7 @@
for (final Endpoint ep : dep.getService().getEndpoints())
{
final String endpointName = ep.getShortName();
- final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(ep.getURLPattern());
+ final List<String> urlPatterns =
WebMetaDataHelper.getUrlPatterns(((HttpEndpoint)ep).getURLPattern());
this.log.debug("Servlet name: " + endpointName + ", URL patterns:
" + urlPatterns);
WebMetaDataHelper.newServletMapping(endpointName, urlPatterns,
servletMappings);
@@ -241,7 +242,7 @@
final WebResourceCollectionsMetaData webResourceCollections =
WebMetaDataHelper
.getWebResourceCollections(securityConstraint);
final String endpointName = ejbEndpoint.getShortName();
- final String urlPattern = ejbEndpoint.getURLPattern();
+ final String urlPattern = ((HttpEndpoint)ejbEndpoint).getURLPattern();
this.log.debug("Creating web resource collection for endpoint: " +
endpointName + ", URL pattern: "
+ urlPattern);
WebMetaDataHelper.newWebResourceCollection(endpointName, urlPattern,
secureWsdlAccess,
Modified:
container/jboss60/branches/jbossws-jboss600M3/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
---
container/jboss60/branches/jbossws-jboss600M3/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-07-09
10:07:15 UTC (rev 12613)
+++
container/jboss60/branches/jbossws-jboss600M3/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-07-09
11:04:05 UTC (rev 12614)
@@ -50,12 +50,21 @@
-->
</bean>
+ <!-- stack agnostic webservices.xml processor -->
+ <bean name="WSDescriptorProcessor"
class="org.jboss.wsf.framework.deployment.jms.WebservicesDescriptorProcessorImpl">
+ <property name="validating">true</property>
+ <property name="descriptorName">webservices.xml</property>
+ </bean>
+
<!-- deployers -->
<bean name="WSDescriptorDeployer"
class="org.jboss.webservices.integration.deployers.WSDescriptorDeployer">
- <property name="name">webservices.xml</property>
- <property name="useSchemaValidation">true</property>
+ <incallback method="setProcessor"/>
</bean>
-
+
+ <bean name="JMSDescriptorDeployer"
class="org.jboss.webservices.integration.deployers.JMSDescriptorDeployer">
+ <incallback method="setProcessor"/>
+ </bean>
+
<bean name="WSEJBAdapterDeployer"
class="org.jboss.webservices.integration.deployers.WSEJBAdapterDeployer"/>
<bean name="WSTypeDeployer"
class="org.jboss.webservices.integration.deployers.WSTypeDeployer"/>