Author: richard.opalka(a)jboss.com
Date: 2008-11-03 04:55:08 -0500 (Mon, 03 Nov 2008)
New Revision: 8615
Added:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java
Removed:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/BareWSFRuntime.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java
container/jboss50/trunk/src/main/resources/jbossws-jboss50-container.jar/
container/jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator
container/jboss50/trunk/src/main/scripts/assembly-container.xml
Modified:
container/jboss50/trunk/pom.xml
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
Log:
[JBWS-2338] svn merge -r 8583:8598
https://svn.jboss.org/repos/jbossws/container/jboss50/ropalka-trunk
Modified: container/jboss50/trunk/pom.xml
===================================================================
--- container/jboss50/trunk/pom.xml 2008-11-03 09:15:12 UTC (rev 8614)
+++ container/jboss50/trunk/pom.xml 2008-11-03 09:55:08 UTC (rev 8615)
@@ -24,8 +24,8 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.0.7.GA</jbossws.common.version>
- <jbossws.spi.version>1.0.6.GA</jbossws.spi.version>
+ <jbossws.common.version>1.0.8-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>1.0.7-SNAPSHOT</jbossws.spi.version>
<!--
JBoss component versions taken from
@@ -225,7 +225,6 @@
</goals>
<configuration>
<descriptors>
-
<descriptor>src/main/scripts/assembly-container.xml</descriptor>
<descriptor>src/main/scripts/assembly-resources.xml</descriptor>
</descriptors>
</configuration>
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/BareWSFRuntime.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/BareWSFRuntime.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/BareWSFRuntime.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,145 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50;
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
-import org.jboss.wsf.spi.invocation.InvocationHandlerFactory;
-import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.management.EndpointRegistry;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class BareWSFRuntime implements WSFRuntime
-{
- private static final Logger log = Logger.getLogger(BareWSFRuntime.class);
-
- private String runtimeName;
-
- private DeploymentAspectManager deploymentManager;
-
- private EndpointRegistry endpointRegistry;
-
- private RequestHandlerFactory requestHandlerFactory;
-
- private InvocationHandlerFactory invocationHandlerFactory;
-
- private TransportManagerFactory transportManagerFactory;
-
- public BareWSFRuntime(String runtimeName)
- {
- this.runtimeName = runtimeName;
- }
-
- // ---------------------------------------------------------------------------------
-
- public void create(Deployment deployment)
- {
- deploymentManager.create(deployment, this);
- }
-
- public void start(Deployment deployment)
- {
- deploymentManager.start(deployment, this);
- }
-
- public void stop(Deployment deployment)
- {
- deploymentManager.stop(deployment, this);
- }
-
- public void destroy(Deployment deployment)
- {
- deploymentManager.destroy(deployment, this);
- }
-
- // ---------------------------------------------------------------------------------
-
- public void setTransportManagerFactory(TransportManagerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> TransportManagerFactory: " + factory);
- this.transportManagerFactory = factory;
- }
-
- public TransportManagerFactory getTransportManagerFactory()
- {
- return this.transportManagerFactory;
- }
-
- public void setEndpointRegistry(EndpointRegistry endpointRegistry)
- {
- assert endpointRegistry!=null;
- log.debug(runtimeName + " -> EndpointRegistry: " + endpointRegistry);
- this.endpointRegistry = endpointRegistry;
- }
-
- public EndpointRegistry getEndpointRegistry()
- {
- return this.endpointRegistry;
- }
-
- public void setDeploymentAspectManager(DeploymentAspectManager deploymentManager)
- {
- assert deploymentManager!=null;
- log.debug(runtimeName + " -> DeploymentAspectManager: " +
deploymentManager);
- this.deploymentManager = deploymentManager;
- }
-
- public DeploymentAspectManager getDeploymentAspectManager()
- {
- return this.deploymentManager;
- }
-
- public void setRequestHandlerFactory(RequestHandlerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> RequestHandlerFactory: "+ factory);
- this.requestHandlerFactory = factory;
- }
-
- public RequestHandlerFactory getRequestHandlerFactory()
- {
- return this.requestHandlerFactory;
- }
-
- public void setInvocationHandlerFactory(InvocationHandlerFactory factory)
- {
- assert factory!=null;
- log.debug(runtimeName + " -> InvocationHandlerFactory: "+ factory);
- this.invocationHandlerFactory = factory;
- }
-
- public InvocationHandlerFactory getInvocationHandlerFactory()
- {
- return this.invocationHandlerFactory;
- }
-
- public String toString()
- {
- return this.runtimeName+ ": " + super.toString();
- }
-}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHook.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -25,10 +25,7 @@
import org.jboss.logging.Logger;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
import org.jboss.wsf.spi.deployment.*;
-import org.jboss.wsf.container.jboss50.deployer.DeployerHook;
/**
* An abstract web service deployer.
@@ -43,32 +40,28 @@
// provide logging
protected final Logger log = Logger.getLogger(getClass());
- protected String runtimeName;
- private WSFRuntime wsfRuntime;
-
+ private DeploymentAspectManager deploymentAspectManager;
private DeploymentModelFactory deploymentModelFactory;
- public WSFRuntime getWsfRuntime()
+ protected String deploymentManagerName;
+
+ /** MC provided property **/
+ public void setDeploymentManagerName(String deploymentManagerName)
{
- if(null == wsfRuntime)
+ this.deploymentManagerName = deploymentManagerName;
+ }
+
+ public DeploymentAspectManager getDeploymentAspectManager()
+ {
+ if(null == deploymentAspectManager)
{
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- wsfRuntime =
spiProvider.getSPI(WSFRuntimeLocator.class).locateRuntime(runtimeName);
+ deploymentAspectManager =
spiProvider.getSPI(DeploymentAspectManagerFactory.class).getDeploymentAspectManager(
deploymentManagerName );
}
-
- return wsfRuntime;
- }
- public void setWsfRuntime(WSFRuntime wsfRuntime)
- {
- this.wsfRuntime = wsfRuntime;
+ return deploymentAspectManager;
}
- public void setRuntimeName(String runtimeName)
- {
- this.runtimeName = runtimeName;
- }
-
public DeploymentModelFactory getDeploymentModelFactory()
{
if(null == deploymentModelFactory)
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookEJB.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -21,13 +21,6 @@
*/
package org.jboss.wsf.container.jboss50.deployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-
/**
* An abstract deployer for EJB Endpoints
*
@@ -36,19 +29,4 @@
*/
public abstract class AbstractDeployerHookEJB extends ArchiveDeployerHook
{
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if(!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- super.deploy(unit); // Calls create
-
- Deployment dep = unit.getAttachment(Deployment.class);
- boolean expectedState = DeploymentState.CREATED == dep.getState() ||
DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step failed");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractDeployerHookJSE.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -28,7 +28,7 @@
import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.metadata.web.spec.ServletMetaData;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.HttpSpec;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
/**
* An abstract deployer for JSE Endpoints
@@ -41,7 +41,7 @@
public boolean isWebServiceDeployment(DeploymentUnit unit)
{
JBossWebMetaData webMetaData = unit.getAttachment(JBossWebMetaData.class);
- boolean isGenerated =
Boolean.TRUE.equals(unit.getAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP));
+ boolean isGenerated =
Boolean.TRUE.equals(unit.getAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP));
return webMetaData != null && isGenerated == false;
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/AbstractWebServiceDeployer.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -40,7 +40,7 @@
// provide logging
private static final Logger log = Logger.getLogger(AbstractWebServiceDeployer.class);
- protected List<DeployerHook> deployerHooks = new
LinkedList<DeployerHook>();
+ private List<DeployerHook> deployerHooks = new
LinkedList<DeployerHook>();
public void addDeployerHook(DeployerHook deployer)
{
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/ArchiveDeployerHook.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -41,37 +41,30 @@
/**
* An abstract web service deployer.
- * <pre>
- * deploy(unit)
+ *
+ * deploy(unit)
* if(isWebServiceDeployment)
* dep = createDeployment(unit)
- * create(dep)
- * start(dep)
+ * deploy(dep)
*
* undeploy(unit)
* dep = getDeployment(unit)
- * stop(dep)
- * destroy(dep)
- * </pre>
+ * undeploy(dep)
*
* @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
* @since 25-Apr-2007
*/
public abstract class ArchiveDeployerHook extends AbstractDeployerHook
{
-
- /**
- * Executes the 'create' step only. <br/>
- * Subclasses need to take care that the 'start' step is executed as well.
- */
+
public void deploy(DeploymentUnit unit) throws DeploymentException
{
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
+ if (ignoreDeployment(unit))
+ return;
+
+ if (isWebServiceDeployment(unit))
{
log.debug("deploy: " + unit.getName());
-
Deployment dep = getDeployment(unit);
if (dep == null)
{
@@ -79,22 +72,11 @@
dep.addAttachment(DeploymentUnit.class, unit);
}
- if(Deployment.DeploymentState.UNDEFINED == dep.getState())
- {
- getWsfRuntime().create(dep);
- unit.addAttachment(Deployment.class, dep);
- }
- else
- {
- throw new IllegalArgumentException("Cannot process Deployment in state
" + dep.getState() + ": " + dep);
- }
+ getDeploymentAspectManager().deploy(dep);
+ unit.addAttachment(Deployment.class, dep);
}
}
- /**
- * Executes the stop() and destroy() lifecycles
- * @param unit
- */
public void undeploy(DeploymentUnit unit)
{
if (ignoreDeployment(unit))
@@ -104,8 +86,7 @@
if (dep != null)
{
log.debug("undeploy: " + unit.getName());
- getWsfRuntime().stop(dep);
- getWsfRuntime().destroy(dep);
+ getDeploymentAspectManager().undeploy(dep);
}
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPostJSE.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -21,12 +21,9 @@
*/
package org.jboss.wsf.container.jboss50.deployer;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
/**
* A deployer JAXRPC JSE Endpoints
@@ -38,26 +35,6 @@
{
/**
- * Expects the 'create' step to be executed in
- * {@link org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE}
- * and executes the 'start' step.
- *
- */
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- Deployment dep = getDeployment(unit);
- boolean expectedState = DeploymentState.CREATED == dep.getState() ||
DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step is missing");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
-
- /**
* Get the deployment type this deployer can handle
*/
public Deployment.DeploymentType getDeploymentType()
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXRPCDeployerHookPreJSE.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -45,11 +45,6 @@
public class JAXRPCDeployerHookPreJSE extends AbstractDeployerHookJSE
{
- public void undeploy(DeploymentUnit unit)
- {
- // the JAXRPCDeployerHookPostJSE deals with undeployments
- }
-
/** Get the deployemnt type this deployer can handle
*/
public DeploymentType getDeploymentType()
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPostJSE.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -22,10 +22,8 @@
package org.jboss.wsf.container.jboss50.deployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.spi.DeploymentException;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.webservices.WebservicesMetaData;
-import static org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
/**
* @author Heiko.Braun(a)jboss.com
@@ -34,26 +32,6 @@
{
/**
- * Expects the 'create' step to be executed in
- * {@link org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE} and
- * executes the 'start' step.
- *
- */
- public void deploy(DeploymentUnit unit) throws DeploymentException
- {
- if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
- {
- Deployment dep = getDeployment(unit);
- boolean expectedState = DeploymentState.CREATED == dep.getState() ||
DeploymentState.STARTED == dep.getState();
- if (null == dep || !expectedState)
- throw new DeploymentException("Create step failed");
-
- // execute the 'start' step
- getWsfRuntime().start(dep);
- }
- }
-
- /**
* Get the deployment type this deployer can handle
*/
public Deployment.DeploymentType getDeploymentType()
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployer/JAXWSDeployerHookPreJSE.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -46,12 +46,6 @@
public class JAXWSDeployerHookPreJSE extends AbstractDeployerHookJSE
{
-
- public void undeploy(DeploymentUnit unit)
- {
- // the JAXWSDeployerHookPostJSE deals with undeployment
- }
-
/** Get the deployment type this deployer can handle
*/
public DeploymentType getDeploymentType()
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/RuntimeLoaderDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -23,7 +23,6 @@
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
@@ -36,7 +35,7 @@
*/
public class RuntimeLoaderDeploymentAspect extends DeploymentAspect
{
- public void start(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
// EJB3 endpoints
if (dep.getAttachment(WebServiceDeployment.class) != null)
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataAdapter.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -30,7 +30,7 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.transport.HttpSpec;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
import java.net.URL;
@@ -80,7 +80,7 @@
if (dep instanceof ArchiveDeployment)
{
URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
- dep.setProperty(HttpSpec.PROPERTY_WEBAPP_URL, webURL);
+ dep.setProperty(WebMetaDataModifier.PROPERTY_WEBAPP_URL, webURL);
}
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/metadata/ContainerMetaDataDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -24,7 +24,6 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that builds the UnifiedDeploymentInfo
@@ -42,7 +41,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
if (unit == null)
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/ModifyWebMetaDataDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -24,7 +24,6 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that modifies the web.xml meta data
@@ -42,7 +41,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
try
{
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifier.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -31,5 +31,11 @@
*/
public interface WebMetaDataModifier
{
+ final static String PROPERTY_GENERATED_WEBAPP =
"org.jboss.ws.generated.webapp";
+ final static String PROPERTY_WEBAPP_CONTEXT_PARAMETERS =
"org.jboss.ws.webapp.ContextParameterMap";
+ final static String PROPERTY_WEBAPP_SERVLET_CLASS =
"org.jboss.ws.webapp.ServletClass";
+ final static String PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER =
"org.jboss.ws.webapp.ServletContextListener";
+ final static String PROPERTY_WEBAPP_URL = "org.jboss.ws.webapp.url";
+
RewriteResults modifyMetaData(Deployment dep) throws ClassNotFoundException;
}
Modified:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/deployment/tomcat/WebMetaDataModifierImpl.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -28,7 +28,6 @@
import org.jboss.metadata.web.spec.ListenerMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.transport.HttpSpec;
import javax.xml.ws.WebServiceException;
import java.util.ArrayList;
@@ -72,11 +71,11 @@
{
RewriteResults results = new RewriteResults();
- String servletClass =
(String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+ String servletClass = (String)dep.getProperty(PROPERTY_WEBAPP_SERVLET_CLASS);
if (servletClass == null)
- throw new IllegalStateException("Cannot obtain context property: " +
HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
+ throw new IllegalStateException("Cannot obtain context property: " +
PROPERTY_WEBAPP_SERVLET_CLASS);
- Map<String, String> depCtxParams = (Map<String,
String>)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
+ Map<String, String> depCtxParams = (Map<String,
String>)dep.getProperty(PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
if (depCtxParams != null)
{
List<ParamValueMetaData> contextParams = jbwmd.getContextParams();
@@ -95,7 +94,7 @@
}
}
- String listenerClass =
(String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
+ String listenerClass =
(String)dep.getProperty(PROPERTY_WEBAPP_SERVLET_CONTEXT_LISTENER);
if (listenerClass != null)
{
List<ListenerMetaData> listeners = jbwmd.getListeners();
@@ -118,16 +117,6 @@
servlet.setInitParam(initParams);
}
- if (servlet.getLoadOnStartup() <= 0)
- {
- // [JBWS-2246] hack. We need to start all webservice endpoint servlets
because of
- // wsdl-publish-location feature. This feature generates wsdl to specified
file
- // location on the FS. Without starting the servlets the WSDL will not be
published
- // because publish wsdl deployment aspect is now called in endpoint init
servlet
- // lifecycle method and not in the deployers chain as it was in AS 4.x
series.
- servlet.setLoadOnStartup(1);
- }
-
String linkName = servlet.getServletName();
// find the servlet-class
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/BareTransportManagerFactory.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.Protocol;
-
-/**
- * Used with MC
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class BareTransportManagerFactory implements TransportManagerFactory
-{
-
- private TransportManager httpTransport;
-
-
- public void setHttpTransport(TransportManager httpTransport)
- {
- this.httpTransport = httpTransport;
- }
-
- public TransportManager createTransportManager(Protocol protocol)
- {
- TransportManager manager = null;
-
- switch(protocol)
- {
- case HTTP:
- manager = httpTransport;
- break;
- default:
- throw new IllegalArgumentException("No TransportManager for protocol:
" + protocol);
- }
-
- return manager;
- }
-}
-
Copied:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
(from rev 8598,
container/jboss50/ropalka-trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java)
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
(rev 0)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.wsf.container.jboss50.transport;
+
+import javax.xml.ws.Endpoint;
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.AbstractExtensible;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
+import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
+import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
+import org.jboss.wsf.spi.deployment.Service;
+import org.jboss.wsf.spi.http.HttpContext;
+import org.jboss.wsf.spi.http.HttpContextFactory;
+import org.jboss.wsf.spi.http.HttpServer;
+
+/**
+ * A HTTP Server that uses DeploymentAspects
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 07-Jul-2006
+ */
+public class DeploymentAspectHttpServer extends AbstractExtensible implements HttpServer
+{
+ /** Start an instance of this HTTP server */
+ public void start()
+ {
+ // verify required properties
+ }
+
+ /** Create an HTTP context */
+ public HttpContext createContext(String contextRoot)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ HttpContext httpContext =
spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
+ return httpContext;
+ }
+
+ /** Publish an JAXWS endpoint to the HTTP server */
+ public void publish(HttpContext context, Endpoint endpoint)
+ {
+ Class implClass = getImplementorClass(endpoint);
+
+ try
+ {
+ // Get the deployment model factory
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ DeploymentModelFactory depModelFactory =
spiProvider.getSPI(DeploymentModelFactory.class);
+
+ // Create/Setup the deployment
+ Deployment dep = depModelFactory.newDeployment("endpoint-deployment",
implClass.getClassLoader());
+ dep.setRuntimeClassLoader(dep.getInitialClassLoader());
+
+ // Create/Setup the service
+ Service service = dep.getService();
+ service.setContextRoot(context.getContextRoot());
+
+ // Create/Setup the endpoint
+ org.jboss.wsf.spi.deployment.Endpoint ep =
depModelFactory.newEndpoint(implClass.getName());
+ service.addEndpoint(ep);
+
+ // Deploy using deployment aspects
+ DeploymentAspectManagerFactory depManagerFactory =
spiProvider.getSPI(DeploymentAspectManagerFactory.class);
+ DeploymentAspectManager depManager =
depManagerFactory.getDeploymentAspectManager("WSDeploymentAspectManagerEndpointAPI");
+ depManager.deploy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ /** Destroys an JAXWS endpoint on the HTTP server */
+ public void destroy(HttpContext context, Endpoint endpoint)
+ {
+ try
+ {
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new WebServiceException(ex);
+ }
+ }
+
+ private Class getImplementorClass(Endpoint endpoint)
+ {
+ Object implementor = endpoint.getImplementor();
+ Class implClass = (implementor instanceof Class ? (Class)implementor :
implementor.getClass());
+ return implClass;
+ }
+}
Copied:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
(from rev 8598,
container/jboss50/ropalka-trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java)
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
(rev 0)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -0,0 +1,119 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.wsf.container.jboss50.transport;
+
+import javax.xml.ws.WebServiceException;
+
+import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.DeploymentFactory;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
+
+/**
+ * Deploy the generated webapp to JBoss
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class DynamicEndpointDeploymentAspect extends DeploymentAspect
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(DynamicEndpointDeploymentAspect.class);
+
+ private DeploymentFactory factory = new DeploymentFactory();
+ private WebMetaDataModifier webMetaDataModifier;
+ private DeployerClient mainDeployer;
+
+ public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
+ {
+ this.webMetaDataModifier = webMetaDataModifier;
+ }
+
+ public void setMainDeployer(DeployerClient mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ public void create(Deployment dep)
+ {
+ JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
+ if (jbwmd == null)
+ throw new WebServiceException("Cannot find web meta data");
+
+ try
+ {
+ webMetaDataModifier.modifyMetaData(dep);
+
+ AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
+ MutableAttachments mutableAttachments =
(MutableAttachments)deployment.getPredeterminedManagedObjects();
+ mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP,
Boolean.TRUE);
+ mutableAttachments.addAttachment(ClassLoaderFactory.class, new
ContextClassLoaderFactory());
+ mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
+ mainDeployer.deploy(deployment);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ public void destroy(Deployment dep)
+ {
+ try
+ {
+ AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
+ mainDeployer.undeploy(deployment);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+
+ private AbstractDeployment createSimpleDeployment(String name)
+ {
+ AbstractDeployment unit = new AbstractDeployment(name);
+ // There is one top level deployment
+ factory.addContext(unit, "");
+ return unit;
+ }
+
+ private static class ContextClassLoaderFactory implements ClassLoaderFactory
+ {
+ public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+ {
+ return Thread.currentThread().getContextClassLoader();
+ }
+
+ public void removeClassLoader(DeploymentUnit unit) throws Exception
+ {
+ }
+ }
+}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EJBHttpTransportManager.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,141 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import org.jboss.logging.Logger;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-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.Endpoint;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.TransportSpec;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Creates a webapp dpeloyment and pushes it into the deployment framework
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class EJBHttpTransportManager implements TransportManager
-{
- private static Logger log = Logger.getLogger(EJBHttpTransportManager.class);
- private static final String PROCESSED_BY_DEPLOYMENT_FACTORY =
"processed.by.deployment.factory";
- private WebAppDeploymentFactory deploymentFactory;
- private WebAppGenerator generator;
- private Map<String, Deployment> deploymentRegistry = new HashMap<String,
Deployment>();
-
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
-
- assert deploymentFactory!=null;
- assert generator!=null;
-
- // Resolve the endpoint address
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " +
transportSpec);
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- // Create JBossWebMetaData and attach it to the DeploymentUnit
- Deployment topLevelDeployment = endpoint.getService().getDeployment();
-
- // TODO: Somehow the ServletClass and InitParameter need to go from TransportSpec
into generator
- topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS,
httpSpec.getServletClass());
- topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS,
httpSpec.getContextParameter());
-
- // TODO: JBWS-2188
- Boolean alreadyDeployed =
(Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed == null) || (false == alreadyDeployed))
- {
- JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
- deploymentFactory.create(topLevelDeployment, jbwMetaData);
- topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
- }
-
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
-
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- ListenerRef listenerRef = null;
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" +
hostAndPort + ctx + pattern));
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
-
- // Map listenerRef for destroy phase
- deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
-
- return listenerRef;
- }
-
- public void destroyListener(ListenerRef ref)
- {
- Deployment dep = deploymentRegistry.get(ref.getUUID());
- if (dep != null)
- {
- // TODO: JBWS-2188
- Boolean alreadyDeployed =
(Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed != null) && (true == alreadyDeployed))
- {
- try
- {
- deploymentFactory.destroy(dep);
- }
- catch (Exception e)
- {
- log.error(e.getMessage(), e);
- }
- dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- }
- }
- deploymentRegistry.remove(ref.getUUID());
- }
-
- public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
- {
- this.deploymentFactory = deploymentFactory;
- }
-
- public void setGenerator(WebAppGenerator generator)
- {
- this.generator = generator;
- }
-}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,209 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import org.jboss.deployers.client.plugins.deployment.AbstractDeployment;
-import org.jboss.deployers.client.spi.DeployerClient;
-import org.jboss.deployers.client.spi.DeploymentFactory;
-import org.jboss.deployers.spi.attachments.MutableAttachments;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
-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.Endpoint;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportSpec;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-
-import javax.xml.ws.WebServiceException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class EndpointAPIHttpTransportManager implements TransportManager
-{
- private static Logger log = Logger.getLogger(EndpointAPIHttpTransportManager.class);
- private static final String PROCESSED_BY_DEPLOYMENT_FACTORY =
"processed.by.deployment.factory";
- private WebAppGenerator generator;
- private DeploymentFactory factory = new DeploymentFactory();
-
- private WebMetaDataModifier webMetaDataModifier;
- private DeployerClient mainDeployer;
-
- private Map<String, Deployment> deploymentRegistry = new HashMap<String,
Deployment>();
-
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
- assert generator!=null;
- assert webMetaDataModifier!=null;
-
- // Resolve the endpoint address
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " +
transportSpec);
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- // Create JBossWebMetaData and attach it to the DeploymentUnit
- Deployment topLevelDeployment = endpoint.getService().getDeployment();
-
- // Pass on to the main deployer
- Boolean alreadyDeployed =
(Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed == null) || (false == alreadyDeployed))
- {
- generator.create(topLevelDeployment);
- deploy(topLevelDeployment);
- topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
- }
-
-
- // Server config
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- ListenerRef listenerRef = null;
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- listenerRef = new HttpListenerRef(ctx, pattern, new URI("http://" +
hostAndPort + ctx + pattern));
- }
- catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
-
- // Map listenerRef for destroy phase
- deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
-
- return listenerRef;
- }
-
- public void destroyListener(ListenerRef ref)
- {
- Deployment dep = deploymentRegistry.get(ref.getUUID());
- if (dep != null)
- {
- // TODO: JBWS-2188
- Boolean alreadyDeployed =
(Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- if ((alreadyDeployed != null) && (true == alreadyDeployed))
- {
- try
- {
- undeploy(dep);
- }
- catch (Exception e)
- {
- log.error(e.getMessage(), e);
- }
- dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
- }
- }
- deploymentRegistry.remove(ref.getUUID());
- }
-
- public void setGenerator(WebAppGenerator generator)
- {
- this.generator = generator;
- }
-
- public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
- {
- this.webMetaDataModifier = webMetaDataModifier;
- }
-
- public void setMainDeployer(DeployerClient mainDeployer)
- {
- this.mainDeployer = mainDeployer;
- }
-
- private void deploy(Deployment dep)
- {
- JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
- if (jbwmd == null)
- throw new WebServiceException("Cannot find web meta data");
-
- try
- {
- webMetaDataModifier.modifyMetaData(dep);
-
- final AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
- MutableAttachments mutableAttachments =
(MutableAttachments)deployment.getPredeterminedManagedObjects();
- mutableAttachments.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP,
Boolean.TRUE);
- mutableAttachments.addAttachment(ClassLoaderFactory.class, new
ContextClassLoaderFactory());
- mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
- mainDeployer.deploy(deployment);
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
-
- private void undeploy(Deployment dep)
- {
- try
- {
- AbstractDeployment deployment =
createSimpleDeployment(dep.getService().getContextRoot());
- mainDeployer.undeploy(deployment);
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
-
- private AbstractDeployment createSimpleDeployment(String name)
- {
- AbstractDeployment unit = new AbstractDeployment(name);
- // There is one top level deployment
- factory.addContext(unit, "");
- return unit;
- }
-
- private static class ContextClassLoaderFactory implements ClassLoaderFactory
- {
- public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
- {
- return Thread.currentThread().getContextClassLoader();
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- }
- }
-}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/NoopHttpTransportManager.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.spi.transport.HttpListenerRef;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.management.ServerConfig;
-import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.transport.HttpSpec;
-import org.jboss.wsf.spi.transport.ListenerRef;
-import org.jboss.wsf.spi.transport.TransportManager;
-import org.jboss.wsf.spi.transport.TransportSpec;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-/**
- * TransportManager implementation that doesn't create physical
- * endpoints (ports, etc) but simply constructs a service endpoint address for a given
- * deployment;
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class NoopHttpTransportManager implements TransportManager
-{
- public ListenerRef createListener(Endpoint endpoint, TransportSpec transportSpec)
- {
- if(! (transportSpec instanceof HttpSpec))
- throw new IllegalArgumentException("Unknown TransportSpec " +
transportSpec);
-
- HttpSpec httpSpec = (HttpSpec)transportSpec;
-
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
- ServerConfig serverConfig = spi.getServerConfig();
-
- String host = serverConfig.getWebServiceHost();
- int port = serverConfig.getWebServicePort();
- String hostAndPort = host + (port > 0 ? ":" + port : "");
-
- try
- {
- String ctx = httpSpec.getWebContext();
- String pattern = httpSpec.getUrlPattern();
- ListenerRef ref = new HttpListenerRef(
- ctx, pattern,
- new URI("http://"+hostAndPort+ctx+pattern)
- );
-
- return ref;
-
- } catch (URISyntaxException e)
- {
- throw new RuntimeException("Failed to create ListenerRef", e);
- }
- }
-
- public void destroyListener(ListenerRef ref)
- {
- // noop
- }
-}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WSFRuntimeDelegateHttpServer.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,132 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import org.jboss.wsf.common.ResourceLoaderAdapter;
-import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.deployment.AbstractExtensible;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
-import org.jboss.wsf.spi.deployment.Service;
-import org.jboss.wsf.spi.http.HttpContext;
-import org.jboss.wsf.spi.http.HttpContextFactory;
-import org.jboss.wsf.spi.http.HttpServer;
-
-import javax.xml.ws.Endpoint;
-import javax.xml.ws.WebServiceException;
-
-/**
- * A HTTP Server that uses DeploymentAspects
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 07-Jul-2006
- */
-public class WSFRuntimeDelegateHttpServer extends AbstractExtensible implements
HttpServer
-{
- /** Start an instance of this HTTP server */
- public void start()
- {
- // verify required properties
- }
-
- /** Create an HTTP context */
- public HttpContext createContext(String contextRoot)
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- HttpContext httpContext =
spiProvider.getSPI(HttpContextFactory.class).newHttpContext(this, contextRoot);
- return httpContext;
- }
-
- /** Publish an JAXWS endpoint to the HTTP server */
- public void publish(HttpContext context, Endpoint endpoint)
- {
- Class implClass = getImplementorClass(endpoint);
-
- try
- {
- // Get the deployment model factory
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- WSFRuntimeLocator locator = spiProvider.getSPI(WSFRuntimeLocator.class);
- WSFRuntime runtime = locator.locateRuntime("EndpointAPIRuntime");
-
- DeploymentModelFactory depModelFactory =
spiProvider.getSPI(DeploymentModelFactory.class);
-
- // Create/Setup the deployment
- Deployment dep = depModelFactory.newDeployment("endpoint-deployment",
implClass.getClassLoader());
- dep.setType(Deployment.DeploymentType.JAXWS_JSE);
- dep.setRuntimeClassLoader(dep.getInitialClassLoader());
-
- // TODO: Hack, should this become another DeploymentAspect?
- ((ArchiveDeployment)dep).setRootFile(new ResourceLoaderAdapter());
-
- // Create/Setup the service
- Service service = dep.getService();
- service.setContextRoot(context.getContextRoot());
-
- // Create/Setup the endpoint
- org.jboss.wsf.spi.deployment.Endpoint ep =
depModelFactory.newEndpoint(implClass.getName());
- ep.setShortName(implClass.getName()+"-Endpoint");
- ep.setURLPattern("/*");
- service.addEndpoint(ep);
-
- // Deploy using deployment aspects
- runtime.create(dep);
- runtime.start(dep);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WebServiceException(ex);
- }
- }
-
- /** Destroys an JAXWS endpoint on the HTTP server */
- public void destroy(HttpContext context, Endpoint endpoint)
- {
- try
- {
-
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WebServiceException(ex);
- }
- }
-
- private Class getImplementorClass(Endpoint endpoint)
- {
- Object implementor = endpoint.getImplementor();
- Class implClass = (implementor instanceof Class ? (Class)implementor :
implementor.getClass());
- return implClass;
- }
-}
Copied:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java
(from rev 8598,
container/jboss50/ropalka-trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java)
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java
(rev 0)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.wsf.container.jboss50.transport;
+
+import javax.security.jacc.PolicyConfiguration;
+import javax.security.jacc.PolicyConfigurationFactory;
+import org.jboss.web.WebPermissionMapping;
+import javax.xml.ws.WebServiceException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
+
+/**
+ * Deploy the generated webapp to JBoss
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author Anil.Saldhana(a)jboss.com
+ * @since 12-May-2006
+ */
+public class WebAppDeploymentAspect extends DeploymentAspect
+{
+ private WebMetaDataModifier webMetaDataModifier;
+
+ public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
+ {
+ this.webMetaDataModifier = webMetaDataModifier;
+ }
+
+ public void create(Deployment dep)
+ {
+ JBossWebMetaData jbwmd = dep.getAttachment(JBossWebMetaData.class);
+ if (jbwmd == null)
+ throw new WebServiceException("Cannot find web meta data");
+
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit != null)
+ {
+ try
+ {
+ webMetaDataModifier.modifyMetaData(dep);
+
+ try
+ {
+ generateJACCPermissions(dep.getSimpleName(), jbwmd); // TODO: make it
another deployment aspect
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Exception generating JACC
perms:",e);
+ }
+
+ // Attaching it to the DeploymentUnit will cause a new webapp deployment
+ unit.addAttachment(JBossWebMetaData.class, jbwmd);
+ unit.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP,
Boolean.TRUE);
+ }
+ catch (Exception ex)
+ {
+ WSFDeploymentException.rethrow(ex);
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Cannot obtain deployment unit");
+ }
+ }
+
+ /**
+ * JBAS-5935: The dynamic web application generated by the JBossWS
+ * does not go through the war security deployer. Hence the JACC
+ * permissions are not created. There is a need to explicitly create
+ * the war jacc permissions.
+ * @param depName
+ * @param jbwmd
+ * @throws Exception
+ */
+ protected void generateJACCPermissions(String depName, JBossWebMetaData jbwmd)
+ throws Exception
+ {
+ PolicyConfigurationFactory policyConfigurationFactory =
+ PolicyConfigurationFactory.getPolicyConfigurationFactory();
+ PolicyConfiguration policyConfiguration =
+ policyConfigurationFactory.getPolicyConfiguration(depName, false);
+ WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
+ policyConfiguration.commit();
+ }
+}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import javax.security.jacc.PolicyConfiguration;
-import javax.security.jacc.PolicyConfigurationFactory;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.web.WebPermissionMapping;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifier;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.transport.HttpSpec;
-
-/**
- * Deploy the generated webapp to JBoss by attaching it
- * to the {@link org.jboss.deployers.structure.spi.DeploymentUnit}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- * @author Anil.Saldhana(a)jboss.com
- *
- * @since 12-May-2006
- */
-public class WebAppDeploymentFactory
-{
- private WebMetaDataModifier webMetaDataModifier;
-
- public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
- {
- this.webMetaDataModifier = webMetaDataModifier;
- }
-
- /**
- * Creates and attaches web meta data to a deployment unit
- * @param dep
- * @return a mofified deployment unit
- */
- public DeploymentUnit create(Deployment dep, JBossWebMetaData jbwmd )
- {
- if (jbwmd == null)
- throw new IllegalArgumentException("Web meta data is cannot be
null");
-
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit != null)
- {
- try
- {
- webMetaDataModifier.modifyMetaData(dep);
-
-
- //Generate the JACC permissions here
- try
- {
- generateJACCPermissions(dep.getSimpleName(), jbwmd);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Exception generating JACC
perms:",e);
- }
-
- // Attaching it to the DeploymentUnit will cause a new webapp deployment
- unit.addAttachment(JBossWebMetaData.class, jbwmd);
- unit.addAttachment(HttpSpec.PROPERTY_GENERATED_WEBAPP, Boolean.TRUE);
-
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
- else
- {
- throw new IllegalStateException("Cannot obtain deployment unit");
- }
-
- return unit;
- }
-
- public void destroy(Deployment dep)
- {
- // nothing to do?
- }
-
- /**
- * JBAS-5935: The dynamic web application generated by the JBossWS
- * does not go through the war security deployer. Hence the JACC
- * permissions are not created. There is a need to explicitly create
- * the war jacc permissions.
- * @param depName
- * @param jbwmd
- * @throws Exception
- */
- protected void generateJACCPermissions(String depName, JBossWebMetaData jbwmd)
- throws Exception
- {
- PolicyConfigurationFactory policyConfigurationFactory =
- PolicyConfigurationFactory.getPolicyConfigurationFactory();
- PolicyConfiguration policyConfiguration =
- policyConfigurationFactory.getPolicyConfiguration(depName, false);
- WebPermissionMapping.createPermissions(jbwmd, policyConfiguration);
- policyConfiguration.commit();
- }
-}
Deleted:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGenerator.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,282 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.wsf.container.jboss50.transport;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jboss.metadata.web.jboss.JBossServletMetaData;
-import org.jboss.metadata.web.jboss.JBossServletsMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.metadata.web.spec.AuthConstraintMetaData;
-import org.jboss.metadata.web.spec.LoginConfigMetaData;
-import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
-import org.jboss.metadata.web.spec.ServletMappingMetaData;
-import org.jboss.metadata.web.spec.TransportGuaranteeType;
-import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
-import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
-import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
-import org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandler;
-
-/**
- * Generates a webapp for an EJB endpoint
- * which will be process by {@link
org.jboss.wsf.container.jboss50.transport.WebAppDeploymentFactory}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 13-Oct-2007
- */
-public class WebAppGenerator
-{
- private SecurityHandler securityHandlerEJB21;
- private SecurityHandler securityHandlerEJB3;
-
- public void setSecurityHandlerEJB21(SecurityHandler handler)
- {
- this.securityHandlerEJB21 = handler;
- }
-
- public void setSecurityHandlerEJB3(SecurityHandler handler)
- {
- this.securityHandlerEJB3 = handler;
- }
-
- public JBossWebMetaData create(Deployment dep)
- {
- JBossWebMetaData jbwmd = null;
-
- String typeStr = dep.getType().toString();
- if (typeStr.endsWith("EJB21"))
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB21);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
- else if (typeStr.endsWith("EJB3"))
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, securityHandlerEJB3);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
- else
- {
- jbwmd = generatWebDeployment((ArchiveDeployment)dep, null);
- dep.addAttachment(JBossWebMetaData.class, jbwmd);
- }
-
- return jbwmd;
- }
-
- protected JBossWebMetaData generatWebDeployment(ArchiveDeployment dep, SecurityHandler
securityHandler)
- {
- JBossWebMetaData jbwmd = new JBossWebMetaData();
- createWebAppDescriptor(dep, jbwmd, securityHandler);
- createJBossWebAppDescriptor(dep, jbwmd, securityHandler);
- return jbwmd;
- }
-
- protected void createWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd,
SecurityHandler securityHandler)
- {
- /*
- <servlet>
- <servlet-name>
- <servlet-class>
- </servlet>
- */
- JBossServletsMetaData servlets = jbwmd.getServlets();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- JBossServletMetaData servlet = new JBossServletMetaData();
- servlet.setServletName(ep.getShortName());
- servlet.setServletClass(ep.getTargetBeanName());
- servlets.add(servlet);
- }
-
- /*
- <servlet-mapping>
- <servlet-name>
- <url-pattern>
- </servlet-mapping>
- */
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- List<ServletMappingMetaData> servletMappings =
jbwmd.getServletMappings();
- if (servletMappings == null)
- {
- servletMappings = new ArrayList<ServletMappingMetaData>();
- jbwmd.setServletMappings(servletMappings);
- }
- ServletMappingMetaData servletMapping = new ServletMappingMetaData();
- servletMapping.setServletName(ep.getShortName());
- servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern()
}));
- servletMappings.add(servletMapping);
- }
-
- String authMethod = null;
-
- // Add web-app/security-constraint for each port component
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String ejbName = ep.getShortName();
-
- Boolean secureWSDLAccess = null;
- String transportGuarantee = null;
- String beanAuthMethod = null;
-
- WebContext anWebContext =
(WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- if (anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- if (anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
- }
-
- EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) !=
null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- beanAuthMethod = smd.getAuthMethod();
- transportGuarantee = smd.getTransportGuarantee();
- secureWSDLAccess = smd.getSecureWSDLAccess();
- }
- }
-
- if (beanAuthMethod != null || transportGuarantee != null)
- {
- /*
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>TestUnAuthPort</web-resource-name>
- <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
- </web-resource-collection>
- <auth-constraint>
- <role-name>*</role-name>
- </auth-constraint>
- <user-data-constraint>
- <transport-guarantee>NONE</transport-guarantee>
- </user-data-constraint>
- </security-constraint>
- */
- List<SecurityConstraintMetaData> securityContraints =
jbwmd.getSecurityContraints();
- if (securityContraints == null)
- {
- securityContraints = new ArrayList<SecurityConstraintMetaData>();
- jbwmd.setSecurityContraints(securityContraints);
- }
- SecurityConstraintMetaData securityConstraint = new
SecurityConstraintMetaData();
- securityContraints.add(securityConstraint);
-
- WebResourceCollectionsMetaData resourceCollections =
securityConstraint.getResourceCollections();
- if (resourceCollections == null)
- {
- resourceCollections = new WebResourceCollectionsMetaData();
- securityConstraint.setResourceCollections(resourceCollections);
- }
- WebResourceCollectionMetaData resourceCollection = new
WebResourceCollectionMetaData();
- resourceCollections.add(resourceCollection);
-
- resourceCollection.setWebResourceName(ejbName);
- resourceCollection.setUrlPatterns(Arrays.asList(new String[] {
ep.getURLPattern() }));
- ArrayList<String> httpMethods = new ArrayList<String>();
- resourceCollection.setHttpMethods(httpMethods);
- if (Boolean.TRUE.equals(secureWSDLAccess))
- {
- httpMethods.add("GET");
- }
- httpMethods.add("POST");
-
- // Optional auth-constraint
- if (beanAuthMethod != null)
- {
- // Only the first auth-method gives the war login-config/auth-method
- if (authMethod == null)
- authMethod = beanAuthMethod;
-
- AuthConstraintMetaData authConstraint = new AuthConstraintMetaData();
- authConstraint.setRoleNames(Arrays.asList(new String[] { "*"
}));
- securityConstraint.setAuthConstraint(authConstraint);
- }
- // Optional user-data-constraint
- if (transportGuarantee != null)
- {
- UserDataConstraintMetaData userDataConstraint = new
UserDataConstraintMetaData();
-
userDataConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(transportGuarantee));
- securityConstraint.setUserDataConstraint(userDataConstraint);
- }
- }
- }
-
- // Optional login-config/auth-method
- if (authMethod != null && securityHandler != null)
- {
- LoginConfigMetaData loginConfig = jbwmd.getLoginConfig();
- if (loginConfig == null)
- {
- loginConfig = new LoginConfigMetaData();
- jbwmd.setLoginConfig(loginConfig);
- }
- loginConfig.setAuthMethod(authMethod);
- loginConfig.setRealmName("EJBServiceEndpointServlet Realm");
-
- securityHandler.addSecurityRoles(jbwmd, dep);
- }
- }
-
- protected void createJBossWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd,
SecurityHandler securityHandler)
- {
- /* Create a jboss-web
- <jboss-web>
- <security-domain>java:/jaas/cts</security-domain>
- <context-root>/ws/ejbN/</context-root>
- <virtual-host>some.domain.com</virtual-host>
- </jboss-web>
- */
- if (securityHandler != null)
- securityHandler.addSecurityDomain(jbwmd, dep);
-
- // Get the context root for this deployment
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new WSFDeploymentException("Cannot obtain context root");
-
- jbwmd.setContextRoot(contextRoot);
- String[] virtualHosts = dep.getService().getVirtualHosts();
- if (virtualHosts != null && virtualHosts.length > 0)
- {
- jbwmd.setVirtualHosts(Arrays.asList(virtualHosts));
- }
- }
-}
Copied:
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java
(from rev 8598,
container/jboss50/ropalka-trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java)
===================================================================
---
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java
(rev 0)
+++
container/jboss50/trunk/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppGeneratorDeploymentAspect.java 2008-11-03
09:55:08 UTC (rev 8615)
@@ -0,0 +1,277 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.wsf.container.jboss50.transport;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jboss.metadata.web.jboss.JBossServletMetaData;
+import org.jboss.metadata.web.jboss.JBossServletsMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.spec.AuthConstraintMetaData;
+import org.jboss.metadata.web.spec.LoginConfigMetaData;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
+import org.jboss.metadata.web.spec.ServletMappingMetaData;
+import org.jboss.metadata.web.spec.TransportGuaranteeType;
+import org.jboss.metadata.web.spec.UserDataConstraintMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionMetaData;
+import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandler;
+
+/**
+ * A deployment aspect that generates a webapp for an EJB endpoint
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 13-Oct-2007
+ */
+public class WebAppGeneratorDeploymentAspect extends DeploymentAspect
+{
+ private SecurityHandler securityHandlerEJB21;
+ private SecurityHandler securityHandlerEJB3;
+
+ public void setSecurityHandlerEJB21(SecurityHandler handler)
+ {
+ this.securityHandlerEJB21 = handler;
+ }
+
+ public void setSecurityHandlerEJB3(SecurityHandler handler)
+ {
+ this.securityHandlerEJB3 = handler;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ String typeStr = dep.getType().toString();
+ if (typeStr.endsWith("EJB21"))
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep,
securityHandlerEJB21);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ else if (typeStr.endsWith("EJB3"))
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep,
securityHandlerEJB3);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ else
+ {
+ JBossWebMetaData jbwmd = generatWebDeployment((ArchiveDeployment)dep, null);
+ dep.addAttachment(JBossWebMetaData.class, jbwmd);
+ }
+ }
+
+ protected JBossWebMetaData generatWebDeployment(ArchiveDeployment dep, SecurityHandler
securityHandler)
+ {
+ JBossWebMetaData jbwmd = new JBossWebMetaData();
+ createWebAppDescriptor(dep, jbwmd, securityHandler);
+ createJBossWebAppDescriptor(dep, jbwmd, securityHandler);
+ return jbwmd;
+ }
+
+ protected void createWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd,
SecurityHandler securityHandler)
+ {
+ /*
+ <servlet>
+ <servlet-name>
+ <servlet-class>
+ </servlet>
+ */
+ JBossServletsMetaData servlets = jbwmd.getServlets();
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ JBossServletMetaData servlet = new JBossServletMetaData();
+ servlet.setServletName(ep.getShortName());
+ servlet.setServletClass(ep.getTargetBeanName());
+ servlets.add(servlet);
+ }
+
+ /*
+ <servlet-mapping>
+ <servlet-name>
+ <url-pattern>
+ </servlet-mapping>
+ */
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ List<ServletMappingMetaData> servletMappings =
jbwmd.getServletMappings();
+ if (servletMappings == null)
+ {
+ servletMappings = new ArrayList<ServletMappingMetaData>();
+ jbwmd.setServletMappings(servletMappings);
+ }
+ ServletMappingMetaData servletMapping = new ServletMappingMetaData();
+ servletMapping.setServletName(ep.getShortName());
+ servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern()
}));
+ servletMappings.add(servletMapping);
+ }
+
+ String authMethod = null;
+
+ // Add web-app/security-constraint for each port component
+ for (Endpoint ep : dep.getService().getEndpoints())
+ {
+ String ejbName = ep.getShortName();
+
+ Boolean secureWSDLAccess = null;
+ String transportGuarantee = null;
+ String beanAuthMethod = null;
+
+ WebContext anWebContext =
(WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
+ if (anWebContext != null)
+ {
+ if (anWebContext.authMethod().length() > 0)
+ beanAuthMethod = anWebContext.authMethod();
+ if (anWebContext.transportGuarantee().length() > 0)
+ transportGuarantee = anWebContext.transportGuarantee();
+ if (anWebContext.secureWSDLAccess())
+ secureWSDLAccess = anWebContext.secureWSDLAccess();
+ }
+
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) !=
null)
+ {
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
+ {
+ beanAuthMethod = smd.getAuthMethod();
+ transportGuarantee = smd.getTransportGuarantee();
+ secureWSDLAccess = smd.getSecureWSDLAccess();
+ }
+ }
+
+ if (beanAuthMethod != null || transportGuarantee != null)
+ {
+ /*
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>TestUnAuthPort</web-resource-name>
+ <url-pattern>/HSTestRoot/TestUnAuth/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>*</role-name>
+ </auth-constraint>
+ <user-data-constraint>
+ <transport-guarantee>NONE</transport-guarantee>
+ </user-data-constraint>
+ </security-constraint>
+ */
+ List<SecurityConstraintMetaData> securityContraints =
jbwmd.getSecurityContraints();
+ if (securityContraints == null)
+ {
+ securityContraints = new ArrayList<SecurityConstraintMetaData>();
+ jbwmd.setSecurityContraints(securityContraints);
+ }
+ SecurityConstraintMetaData securityConstraint = new
SecurityConstraintMetaData();
+ securityContraints.add(securityConstraint);
+
+ WebResourceCollectionsMetaData resourceCollections =
securityConstraint.getResourceCollections();
+ if (resourceCollections == null)
+ {
+ resourceCollections = new WebResourceCollectionsMetaData();
+ securityConstraint.setResourceCollections(resourceCollections);
+ }
+ WebResourceCollectionMetaData resourceCollection = new
WebResourceCollectionMetaData();
+ resourceCollections.add(resourceCollection);
+
+ resourceCollection.setWebResourceName(ejbName);
+ resourceCollection.setUrlPatterns(Arrays.asList(new String[] {
ep.getURLPattern() }));
+ ArrayList<String> httpMethods = new ArrayList<String>();
+ resourceCollection.setHttpMethods(httpMethods);
+ if (Boolean.TRUE.equals(secureWSDLAccess))
+ {
+ httpMethods.add("GET");
+ }
+ httpMethods.add("POST");
+
+ // Optional auth-constraint
+ if (beanAuthMethod != null)
+ {
+ // Only the first auth-method gives the war login-config/auth-method
+ if (authMethod == null)
+ authMethod = beanAuthMethod;
+
+ AuthConstraintMetaData authConstraint = new AuthConstraintMetaData();
+ authConstraint.setRoleNames(Arrays.asList(new String[] { "*"
}));
+ securityConstraint.setAuthConstraint(authConstraint);
+ }
+ // Optional user-data-constraint
+ if (transportGuarantee != null)
+ {
+ UserDataConstraintMetaData userDataConstraint = new
UserDataConstraintMetaData();
+
userDataConstraint.setTransportGuarantee(TransportGuaranteeType.valueOf(transportGuarantee));
+ securityConstraint.setUserDataConstraint(userDataConstraint);
+ }
+ }
+ }
+
+ // Optional login-config/auth-method
+ if (authMethod != null && securityHandler != null)
+ {
+ LoginConfigMetaData loginConfig = jbwmd.getLoginConfig();
+ if (loginConfig == null)
+ {
+ loginConfig = new LoginConfigMetaData();
+ jbwmd.setLoginConfig(loginConfig);
+ }
+ loginConfig.setAuthMethod(authMethod);
+ loginConfig.setRealmName("EJBServiceEndpointServlet Realm");
+
+ securityHandler.addSecurityRoles(jbwmd, dep);
+ }
+ }
+
+ protected void createJBossWebAppDescriptor(Deployment dep, JBossWebMetaData jbwmd,
SecurityHandler securityHandler)
+ {
+ /* Create a jboss-web
+ <jboss-web>
+ <security-domain>java:/jaas/cts</security-domain>
+ <context-root>/ws/ejbN/</context-root>
+ <virtual-host>some.domain.com</virtual-host>
+ </jboss-web>
+ */
+ if (securityHandler != null)
+ securityHandler.addSecurityDomain(jbwmd, dep);
+
+ // Get the context root for this deployment
+ String contextRoot = dep.getService().getContextRoot();
+ if (contextRoot == null)
+ throw new WSFDeploymentException("Cannot obtain context root");
+
+ jbwmd.setContextRoot(contextRoot);
+ String[] virtualHosts = dep.getService().getVirtualHosts();
+ if (virtualHosts != null && virtualHosts.length > 0)
+ {
+ jbwmd.setVirtualHosts(Arrays.asList(virtualHosts));
+ }
+ }
+}
Modified:
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
===================================================================
---
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1,162 +1,353 @@
<?xml version="1.0" encoding="UTF-8"?>
-<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_2_0.xsd"
- xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
-
*********************************************************************************************************************
- Web Service deployment
-
- There are two deployers registered with the JBoss Main Deployer.
- The order of which is important
-
- 1) EJBDeployer < WebServiceDeployerEJB < WarDeployer
- 2) WebServiceDeployerPreJSE < WarDeployer
- 3) WarDeployer < WebServiceDeployerPostJSE
-
- Each WebServiceDeployer has a number of DeployerHooks registered with it
-
- - WebServiceDeployerEJB
- - WSDeployerHook_JAXRPC_EJB21
- - WSDeployerHook_JAXWS_EJB3
-
- - WebServiceDeployerPreJSE
- - WSDeployerHook_JAXRPC_JSE
- - WSDeployerHook_JAXWS_JSE
-
- Conceptually, each of these hooks implements the following pattern:
-
- DeployerHook.deploy(unit)
- if(isWebServiceDeployment)
- Deployment dep = createDeployment(unit)
- DeploymentAspectManager.deploy(dep)
-
- DeployerHook.undeploy(unit)
- Deployment dep = getDeployment(unit)
- WSFRuntime.start(dep)
-
- Each deployer hook has a web service WSFRuntime injected into it.
-
-
*********************************************************************************************************************
-->
-
- <!--
- A web service deployer that hooks in after the EJB deployers
- -->
- <bean name="WebServiceDeployerEJB"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB">
- <depends>EJB2xDeployer</depends>
- <depends>Ejb3Deployer</depends>
- </bean>
-
- <!--
- A web service deployer that hooks in before the WAR deployer
- -->
- <bean name="WebServiceDeployerPreJSE"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE">
- <property name="relOrderWar"><inject
bean="WarDeployer" property="relativeOrder"/></property>
- <depends>WebAppParsingDeployer</depends>
- </bean>
-
- <!--
- A web service deployer that hooks in after the WAR deployer
- -->
- <bean name="WebServiceDeployerPostJSE"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE">
- <depends>WarDeployer</depends>
- </bean>
-
- <!--
- Register DeployerHooks with JBoss deployers
- -->
-
- <!-- Phase 1 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_PRE_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPreJSE"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPreJSE"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPreJSE</depends>
- </bean>
- <!-- Phase 2 of JSE JAX-RPC -->
- <bean name="WSDeployerHook_JAXRPC_POST_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPostJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPostJSE"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPostJSE"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPostJSE</depends>
- </bean>
-
- <bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookEJB21">
- <property name="runtimeName">WebserviceEJBRuntime</property>
- <install bean="WebServiceDeployerEJB"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerEJB"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerEJB</depends>
- </bean>
-
- <!-- Phase 1 of JSE JAX-WS-->
- <bean name="WSDeployerHook_JAXWS_PRE_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPreJSE"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPreJSE"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPreJSE</depends>
- </bean>
- <!-- Phase 2 of JSE JAX-WS -->
- <bean name="WSDeployerHook_JAXWS_POST_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPostJSE">
- <property name="runtimeName">WebserviceJSERuntime</property>
- <install bean="WebServiceDeployerPostJSE"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerPostJSE"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerPostJSE</depends>
- </bean>
-
- <bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3">
- <property name="runtimeName">WebserviceEJBRuntime</property>
- <install bean="WebServiceDeployerEJB"
method="addDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </install>
- <uninstall bean="WebServiceDeployerEJB"
method="removeDeployerHook">
- <parameter>
- <this/>
- </parameter>
- </uninstall>
- <depends>WebServiceDeployerEJB</depends>
- </bean>
-
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator"
class="org.jboss.wsf.spi.util.KernelLocator">
+ <property name="kernel"><inject
bean="jboss.kernel:service=Kernel"/></property>
+ </bean>
+
+ <!-- Locate the single instance of the MBeanServer -->
+ <bean name="WSMBeanServerLocator"
class="org.jboss.wsf.framework.management.MBeanServerLocator">
+ <property name="mbeanServer"><inject bean="JMXKernel"
property="mbeanServer"/></property>
+ </bean>
+
+ <!-- The HTTPServer used by the JAXWS Endpoint API -->
+ <bean name="WSHTTPServer"
class="org.jboss.wsf.container.jboss50.transport.DeploymentAspectHttpServer"/>
+
+ <!--
*********************************************************************************************************************
+ Web Service deployment
+
+ There are two deployers registered with the JBoss Main Deployer.
+ The order of which is important
+
+ 1) EJBDeployer < WebServiceDeployerEJB < WarDeployer
+ 2) WebServiceDeployerPreJSE < WarDeployer
+ 3) WarDeployer < WebServiceDeployerPostJSE
+
+ Each WebServiceDeployer has a number of DeployerHooks registered with it
+
+ - WebServiceDeployerEJB
+ - WSDeployerHook_JAXRPC_EJB21
+ - WSDeployerHook_JAXWS_EJB3
+
+ - WebServiceDeployerPreJSE
+ - WSDeployerHook_JAXRPC_JSE
+ - WSDeployerHook_JAXWS_JSE
+
+ Conceptually, each of these hooks implements the following pattern:
+
+ DeployerHook.deploy(unit)
+ if(isWebServiceDeployment)
+ Deployment dep = createDeployment(unit)
+ DeploymentAspectManager.deploy(dep)
+
+ DeployerHook.undeploy(unit)
+ Deployment dep = getDeployment(unit)
+ DeploymentAspectManager.undeploy(dep)
+
+ Each deployer hook has a web service DeploymentAspectManager injected into it.
+ A web service DeploymentAspectManager maintains a list of DeploymentAspects, each of
which
+ handles a single aspect of web service deployment.
+
+ Finally, each Endpoint is registered with the EndpointRegistry.
+
+
*********************************************************************************************************************
-->
+
+ <!--
+ A web service deployer that hooks in after the EJB deployers
+ -->
+ <bean name="WebServiceDeployerEJB"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB">
+ <depends>EJB2xDeployer</depends>
+ <depends>Ejb3Deployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in before the WAR deployer
+ -->
+ <bean name="WebServiceDeployerPreJSE"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPreJSE">
+ <property name="relOrderWar"><inject bean="WarDeployer"
property="relativeOrder"/></property>
+ <depends>WebAppParsingDeployer</depends>
+ </bean>
+
+ <!--
+ A web service deployer that hooks in after the WAR deployer
+ -->
+ <bean name="WebServiceDeployerPostJSE"
class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerPostJSE">
+ <depends>WarDeployer</depends>
+ </bean>
+
+ <!--
+ Register DeployerHooks with JBoss deployers
+ -->
+
+ <!-- Phase 1 of JSE JAX-RPC -->
+ <bean name="WSDeployerHook_JAXRPC_PRE_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPreJSE">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+ <install bean="WebServiceDeployerPreJSE"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPreJSE"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPreJSE</depends>
+ </bean>
+ <!-- Phase 2 of JSE JAX-RPC -->
+ <bean name="WSDeployerHook_JAXRPC_POST_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookPostJSE">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+ <install bean="WebServiceDeployerPostJSE"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPostJSE"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPostJSE</depends>
+ </bean>
+
+ <bean name="WSDeployerHook_JAXRPC_EJB21"
class="org.jboss.wsf.container.jboss50.deployer.JAXRPCDeployerHookEJB21">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerEJB</property>
+ <install bean="WebServiceDeployerEJB"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+
+ <!-- Phase 1 of JSE JAX-WS-->
+ <bean name="WSDeployerHook_JAXWS_PRE_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPreJSE">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerPreJSE</property>
+ <install bean="WebServiceDeployerPreJSE"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPreJSE"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPreJSE</depends>
+ </bean>
+ <!-- Phase 2 of JSE JAX-WS -->
+ <bean name="WSDeployerHook_JAXWS_POST_JSE"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookPostJSE">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerPostJSE</property>
+ <install bean="WebServiceDeployerPostJSE"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerPostJSE"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerPostJSE</depends>
+ </bean>
+
+ <bean name="WSDeployerHook_JAXWS_EJB3"
class="org.jboss.wsf.container.jboss50.deployer.JAXWSDeployerHookEJB3">
+ <property
name="deploymentManagerName">WSDeploymentAspectManagerEJB</property>
+ <install bean="WebServiceDeployerEJB"
method="addDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </install>
+ <uninstall bean="WebServiceDeployerEJB"
method="removeDeployerHook">
+ <parameter>
+ <this/>
+ </parameter>
+ </uninstall>
+ <depends>WebServiceDeployerEJB</depends>
+ </bean>
+
+ <!--
+ Each DeploymentAspectManger maintains a list of DeploymentAspects
+ -->
+ <bean name="WSDeploymentAspectManagerPreJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property
name="name">WSDeploymentAspectManagerPreJSE</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerPostJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="parent"><inject
bean="WSDeploymentAspectManagerPreJSE"/></property>
+ <property
name="name">WSDeploymentAspectManagerPostJSE</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property name="name">WSDeploymentAspectManagerEJB</property>
+ </bean>
+ <bean name="WSDeploymentAspectManagerEndpointAPI"
class="org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl">
+ <property
name="name">WSDeploymentAspectManagerEndpointAPI</property>
+ </bean>
+
+ <!--
+ The container deployment aspects
+ -->
+ <bean name="WSContainerMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.deployment.metadata.ContainerMetaDataDeploymentAspect">
+ <property name="provides">ContainerMetaData,
VFSRoot</property>
+ </bean>
+
+ <bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContextRoot</property>
+ </bean>
+
+ <bean name="WSVirtualHostDeploymentAspect"
class="org.jboss.wsf.framework.deployment.VirtualHostDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">VirtualHosts</property>
+ </bean>
+
+ <bean name="WSDynamicEndpointDeploymentAspect"
class="org.jboss.wsf.container.jboss50.transport.DynamicEndpointDeploymentAspect">
+ <property name="requires">WebMetaData,
ContextProperties</property>
+ <property name="webMetaDataModifier"><inject
bean="WSWebMetaDataModifier"/></property>
+ <property name="mainDeployer"><inject
bean="MainDeployer"/></property>
+ </bean>
+
+ <bean name="WSEndpointAddressDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointAddressDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">EndpointAddress</property>
+ </bean>
+
+ <bean name="WSEndpointAPIDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointAPIDeploymentAspect">
+ <property name="provides">ContainerMetaData, RuntimeLoader,
URLPattern, VFSRoot</property>
+ </bean>
+
+ <bean name="WSEndpointHandlerDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">ContainerEndpointHandler</property>
+ </bean>
+
+ <bean name="WSEndpointLifecycleDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointLifecycleDeploymentAspect">
+ <property name="requires">LAST_DEPLOYMENT_ASPECT</property>
+ </bean>
+
+ <bean name="WSEndpointMetricsDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointMetricsDeploymentAspect">
+ <property name="provides">EndpointMetrics</property>
+ </bean>
+
+ <bean name="WSEndpointNameDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointNameDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">EndpointName</property>
+ </bean>
+
+ <bean name="WSEndpointRegistryDeploymentAspect"
class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
+ <property name="requires">EndpointName</property>
+ <property name="provides">RegisteredEndpoint</property>
+ </bean>
+
+ <bean name="WSModifyWebMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.deployment.tomcat.ModifyWebMetaDataDeploymentAspect">
+ <property name="requires">ContextProperties,
StackDescriptor</property>
+ <property name="webMetaDataModifier"><inject
bean="WSWebMetaDataModifier"/></property>
+ </bean>
+
+ <bean name="WSRuntimeLoaderDeploymentAspect"
class="org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect">
+ <property name="requires">ContainerMetaData</property>
+ <property name="provides">RuntimeLoader</property>
+ </bean>
+
+ <bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
+ <property name="requires">ContextRoot,
ContainerMetaData</property>
+ <property name="provides">URLPattern</property>
+ </bean>
+
+ <bean name="WSWebAppDeploymentAspect"
class="org.jboss.wsf.container.jboss50.transport.WebAppDeploymentAspect">
+ <property name="requires">WebMetaData,
ContextProperties</property>
+ <property name="webMetaDataModifier"><inject
bean="WSWebMetaDataModifier"/></property>
+ </bean>
+
+ <bean name="WSWebAppGeneratorDeploymentAspect"
class="org.jboss.wsf.container.jboss50.transport.WebAppGeneratorDeploymentAspect">
+ <property name="requires">URLPattern</property>
+ <property name="provides">WebMetaData</property>
+ <property name="securityHandlerEJB21"><inject
bean="WSSecurityHandlerEJB21"/></property>
+ <property name="securityHandlerEJB3"><inject
bean="WSSecurityHandlerEJB3"/></property>
+ </bean>
+
+ <!-- Deployment aspect helper beans -->
+ <bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandlerEJB21"/>
+ <bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss50.deployment.tomcat.SecurityHandlerEJB3"/>
+ <bean name="WSWebMetaDataModifier"
class="org.jboss.wsf.container.jboss50.deployment.tomcat.WebMetaDataModifierImpl"/>
+
+ <!-- Deployment aspect installers -->
+
+ <!-- Phase 1 -->
+ <bean name="WSDeploymentAspectInstallerPreJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerPreJSE"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSModifyWebMetaDataDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <!-- Phase 2 -->
+ <bean name="WSDeploymentAspectInstallerPostJSE"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerPostJSE"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSRuntimeLoaderDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <bean name="WSDeploymentAspectInstallerEJB"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
+ <inject bean="WSContextRootDeploymentAspect"/>
+ <inject bean="WSVirtualHostDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSURLPatternDeploymentAspect"/>
+ <inject bean="WSRuntimeLoaderDeploymentAspect"/>
+ <inject bean="WSWebAppDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
+ <bean name="WSDeploymentAspectInstallerEndpointAPI"
class="org.jboss.wsf.framework.deployment.DeploymentAspectInstaller">
+ <property name="manager"><inject
bean="WSDeploymentAspectManagerEndpointAPI"/></property>
+ <property name="sortAspectsOnCreate">false</property>
+ <property name="aspects">
+ <set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSDynamicEndpointDeploymentAspect"/>
+ <inject bean="WSEndpointAPIDeploymentAspect"/>
+ <inject bean="WSEndpointAddressDeploymentAspect"/>
+ <inject bean="WSEndpointHandlerDeploymentAspect"/>
+ <inject bean="WSEndpointLifecycleDeploymentAspect"/>
+ <inject bean="WSEndpointMetricsDeploymentAspect"/>
+ <inject bean="WSEndpointNameDeploymentAspect"/>
+ <inject bean="WSEndpointRegistryDeploymentAspect"/>
+ <inject bean="WSWebAppGeneratorDeploymentAspect"/>
+ </set>
+ </property>
+ </bean>
+
</deployment>
Deleted:
container/jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator
===================================================================
---
container/jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator 2008-11-03
09:15:12 UTC (rev 8614)
+++
container/jboss50/trunk/src/main/resources/jbossws-jboss50.jar/META-INF/services/org.jboss.wsf.spi.WSFRuntimeLocator 2008-11-03
09:55:08 UTC (rev 8615)
@@ -1 +0,0 @@
-org.jboss.wsf.framework.DefaultWSFRuntimeLocator
\ No newline at end of file
Deleted: container/jboss50/trunk/src/main/scripts/assembly-container.xml
===================================================================
--- container/jboss50/trunk/src/main/scripts/assembly-container.xml 2008-11-03 09:15:12
UTC (rev 8614)
+++ container/jboss50/trunk/src/main/scripts/assembly-container.xml 2008-11-03 09:55:08
UTC (rev 8615)
@@ -1,14 +0,0 @@
-<assembly
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
- <id>container</id>
- <formats>
- <format>jar</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
- <fileSets>
- <fileSet>
-
<directory>src/main/resources/jbossws-jboss50-container.jar</directory>
- <outputDirectory>/</outputDirectory>
- </fileSet>
- </fileSets>
-</assembly>
\ No newline at end of file