JBossWS SVN: r8618 - container/jboss50/trunk.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-11-03 05:03:14 -0500 (Mon, 03 Nov 2008)
New Revision: 8618
Modified:
container/jboss50/trunk/pom.xml
Log:
Updating dependencies
Modified: container/jboss50/trunk/pom.xml
===================================================================
--- container/jboss50/trunk/pom.xml 2008-11-03 10:02:14 UTC (rev 8617)
+++ container/jboss50/trunk/pom.xml 2008-11-03 10:03:14 UTC (rev 8618)
@@ -35,10 +35,10 @@
<jboss.ejb3.version>1.0.0-Beta5</jboss.ejb3.version>
<jboss.deployers.version>2.0.0.CR3</jboss.deployers.version>
<jboss.jbossxb.version>2.0.0.GA</jboss.jbossxb.version>
- <jboss.metadata.version>1.0.0.CR3</jboss.metadata.version>
+ <jboss.metadata.version>1.0.0.CR5</jboss.metadata.version>
<jboss.microcontainer.version>2.0.0.CR3</jboss.microcontainer.version>
<jboss.reflect.version>2.0.0.GA</jboss.reflect.version>
- <jboss.security.version>2.0.2.CR9</jboss.security.version>
+ <jboss.security.version>2.0.2.CR11</jboss.security.version>
<jboss.vfs.version>2.0.0.CR1</jboss.vfs.version>
</properties>
16 years, 1 month
JBossWS SVN: r8617 - container/jboss50/branches/jboss500CR2.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-03 05:02:14 -0500 (Mon, 03 Nov 2008)
New Revision: 8617
Added:
container/jboss50/branches/jboss500CR2/trunk/
Log:
creating CR2 container integration branch
Copied: container/jboss50/branches/jboss500CR2/trunk (from rev 8616, container/jboss50/trunk)
16 years, 1 month
JBossWS SVN: r8616 - container/jboss50/branches.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-03 05:00:45 -0500 (Mon, 03 Nov 2008)
New Revision: 8616
Added:
container/jboss50/branches/jboss500CR2/
Log:
creating CR2 container integration branch
16 years, 1 month
JBossWS SVN: r8615 - in container/jboss50/trunk: src/main/java/org/jboss/wsf/container/jboss50 and 9 other directories.
by jbossws-commits@lists.jboss.org
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
16 years, 1 month
JBossWS SVN: r8614 - in framework/trunk/src: main/java/org/jboss/wsf/framework and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-03 04:15:12 -0500 (Mon, 03 Nov 2008)
New Revision: 8614
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/transport/
framework/trunk/src/test/
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
Log:
[JBWS-2338] svn merge -r 8567:8569 https://svn.jboss.org/repos/jbossws/framework/branches/ropalka
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultSPIProvider.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -28,15 +28,12 @@
import org.jboss.wsf.framework.http.DefaultHttpContextFactory;
import org.jboss.wsf.framework.http.DefaultHttpServerFactory;
import org.jboss.wsf.framework.invocation.DefaultResourceInjectorFactory;
-import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
import org.jboss.wsf.framework.management.ServerConfigFactoryImpl;
+import org.jboss.wsf.framework.management.DefaultEndpointMetricsFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefHandlerFactory;
import org.jboss.wsf.framework.serviceref.DefaultServiceRefMetaDataParserFactory;
-import org.jboss.wsf.framework.transport.DefaultTransportManagerFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.WSFException;
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
import org.jboss.wsf.spi.deployment.DeploymentAspectManagerFactory;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
@@ -112,18 +109,10 @@
{
returnType = (T)loadService(spiType, DefaultServiceRefMetaDataParserFactory.class.getName());
}
- else if (TransportManagerFactory.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultTransportManagerFactory.class.getName());
- }
else if (ServerConfigFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, ServerConfigFactoryImpl.class.getName());
}
- else if (WSFRuntimeLocator.class.equals(spiType))
- {
- returnType = (T)loadService(spiType, DefaultWSFRuntimeLocator.class.getName());
- }
// SPI provided by either container or stack integration
@@ -143,7 +132,6 @@
{
returnType = (T)loadService(spiType, null);
}
-
else if (ServiceRefBinderFactory.class.equals(spiType))
{
returnType = (T)loadService(spiType, null);
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/DefaultWSFRuntimeLocator.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -1,40 +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.framework;
-
-import org.jboss.wsf.spi.WSFRuntimeLocator;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.common.KernelAwareSPIFactory;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class DefaultWSFRuntimeLocator implements WSFRuntimeLocator
-{
-
- public WSFRuntime locateRuntime(String runtimeName)
- {
- return new KernelAwareSPIFactory().getKernelProvidedSPI(
- runtimeName, WSFRuntime.class
- );
- }
-}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextPropertiesDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -23,12 +23,10 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.WSFRuntime;
import java.util.Iterator;
import java.util.Map;
-
/**
* Populate deployment context properties
*
@@ -51,7 +49,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
if (contextProperties != null)
{
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -28,7 +28,6 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that assigns the context root to the service
@@ -39,7 +38,7 @@
public class ContextRootDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null)
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DeploymentAspectManagerImpl.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -33,16 +33,11 @@
import org.jboss.wsf.spi.deployment.DeploymentAspectManager;
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentState;
-import org.jboss.wsf.spi.WSFRuntime;
/**
- * Process an ordered chain of {@link org.jboss.wsf.spi.deployment.DeploymentAspect}'s
- * on a {@link org.jboss.wsf.spi.deployment.DeploymentLifecycle}
+ * A general service deployment manger.
*
* @author Thomas.Diesler(a)jboss.com
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 20-Apr-2007
*/
public class DeploymentAspectManagerImpl implements DeploymentAspectManager
{
@@ -86,19 +81,18 @@
// Debug the aspect list
StringBuilder builder = new StringBuilder("setDeploymentAspects on " + name);
for (DeploymentAspect aspect : aspects)
- builder.append("\n ")
- .append(aspect.getClass().getName())
- .append(" provides: ")
- .append(aspect.getProvidesAsSet())
- .append(" requires: ")
- .append(aspect.getRequiresAsSet()
- );
+ builder.append("\n " + aspect.getClass().getName() + " provides: " + aspect.getProvidesAsSet() + " requires: " + aspect.getRequiresAsSet());
log.debug(builder);
}
-
- public void create(Deployment dep, WSFRuntime runtime)
+ /**
+ * Iterate over the registered deployers calls create on each.
+ * Iterate over the registered deployers again and calls start on each.
+ * If start fails it automaticall calls destroy in the reverse order
+ * starting with the deployer that failed
+ */
+ public void deploy(Deployment dep)
{
// create the deployment
Set<String> providedConditions = new HashSet<String>();
@@ -106,34 +100,25 @@
{
DeploymentAspect aspect = getDeploymentAspects().get(i);
- // Check that all required aspects are met
+ // Check that all required aspects are met
/*
TODO: This should done by adding all provided conditions to the Deployment
when being executed. Otherwise we will miss the parent provided conditions here
-
+
Set<String> requiredSet = aspect.getRequiresAsSet();
requiredSet.remove(DeploymentAspect.LAST_DEPLOYMENT_ASPECT);
if (providedConditions.containsAll(requiredSet) == false)
throw new IllegalStateException("Required conditions '" + aspect.getRequires() + "' not satisfied by '" + providedConditions + "' for: " + aspect);
*/
- logInvocation(aspect, "Create");
- aspect.create(dep, runtime);
+ logInvocation(aspect, "Create");
+ aspect.create(dep);
providedConditions.addAll(aspect.getProvidesAsSet());
}
dep.setState(DeploymentState.CREATED);
- }
- /**
- * Iterate over the registered deployers calls create on each.
- * Iterate over the registered deployers again and calls start on each.
- * If start fails it automaticall calls destroy in the reverse order
- * starting with the deployer that failed
- */
- public void start(Deployment dep, WSFRuntime runtime)
- {
// start the deployment
for (int i = 0; i < getDeploymentAspects().size(); i++)
{
@@ -141,14 +126,14 @@
try
{
logInvocation(aspect, "Start");
- aspect.start(dep, runtime);
+ aspect.start(dep);
}
catch (RuntimeException rte)
{
while (i-- >= 0)
{
// destroy the deployment
- failsafeDestroy(aspect, dep, runtime);
+ failsafeDestroy(aspect, dep);
}
throw rte;
}
@@ -157,37 +142,33 @@
dep.setState(DeploymentState.STARTED);
}
- public void stop(Deployment dep, WSFRuntime runtime)
+ public void undeploy(Deployment dep)
{
// stop the deployment
for (int i = getDeploymentAspects().size(); 0 < i; i--)
{
DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeStop(aspect, dep, runtime);
+ failsafeStop(aspect, dep);
}
dep.setState(DeploymentState.STOPPED);
- }
-
- public void destroy(Deployment dep, WSFRuntime runtime)
- {
// destroy the deployment
for (int i = getDeploymentAspects().size(); 0 < i; i--)
{
DeploymentAspect aspect = getDeploymentAspects().get(i - 1);
- failsafeDestroy(aspect, dep, runtime);
+ failsafeDestroy(aspect, dep);
}
dep.setState(DeploymentState.DESTROYED);
}
- private void failsafeStop(DeploymentAspect aspect, Deployment dep, WSFRuntime runtime)
+ private void failsafeStop(DeploymentAspect aspect, Deployment dep)
{
try
{
logInvocation(aspect, "Stop");
- aspect.stop(dep, runtime);
+ aspect.stop(dep);
}
catch (RuntimeException rte)
{
@@ -195,12 +176,12 @@
}
}
- private void failsafeDestroy(DeploymentAspect aspect, Deployment dep, WSFRuntime runtime)
+ private void failsafeDestroy(DeploymentAspect aspect, Deployment dep)
{
try
{
logInvocation(aspect, "Destroy");
- aspect.destroy(dep, runtime);
+ aspect.destroy(dep);
}
catch (RuntimeException rte)
{
@@ -214,9 +195,4 @@
name = name.substring(name.lastIndexOf(".") + 1);
log.debug(name + ":" + method);
}
-
- public String toString()
- {
- return this.name + " :" + super.toString();
- }
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAPIDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -28,7 +28,6 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.UnifiedVirtualFile;
import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployment aspect for JAXWS Endpoint API endpoints.
@@ -39,7 +38,7 @@
public class EndpointAPIDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
dep.setType(DeploymentType.JAXWS_JSE);
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointAddressDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -23,7 +23,6 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -39,7 +38,7 @@
public class EndpointAddressDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null)
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointDeployerLifecycleDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.framework.deployment;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.deployment.Deployment;
/**
@@ -31,13 +30,13 @@
public class EndpointDeployerLifecycleDeploymentAspect extends EndpointLifecycleDeploymentAspect
{
@Override
- public void start(Deployment dep, WSFRuntime runtime)
+ public void start(Deployment dep)
{
// do nothing in deployers
}
@Override
- public void stop(Deployment dep, WSFRuntime runtime)
+ public void stop(Deployment dep)
{
// do nothing in deployers
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -23,7 +23,6 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-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.Endpoint;
@@ -55,7 +54,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointLifecycleDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -22,7 +22,6 @@
package org.jboss.wsf.framework.deployment;
import org.jboss.wsf.spi.deployment.*;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that that calls the endpoint lifecycle handler
@@ -33,7 +32,7 @@
public class EndpointLifecycleDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
@@ -42,7 +41,7 @@
}
@Override
- public void start(Deployment dep, WSFRuntime runtime)
+ public void start(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
@@ -51,7 +50,7 @@
}
@Override
- public void stop(Deployment dep, WSFRuntime runtime)
+ public void stop(Deployment dep)
{
Service service = dep.getService();
if (service != null)
@@ -66,7 +65,7 @@
}
@Override
- public void destroy(Deployment dep, WSFRuntime runtime)
+ public void destroy(Deployment dep)
{
Service service = dep.getService();
if (service != null)
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointMetricsDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -23,7 +23,6 @@
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.management.EndpointMetrics;
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -39,7 +38,7 @@
public class EndpointMetricsDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
EndpointMetricsFactory factory = provider.getSPI(EndpointMetricsFactory.class);
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -27,7 +27,6 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.common.ObjectNameFactory;
/**
@@ -39,7 +38,7 @@
public class EndpointNameDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
String contextRoot = dep.getService().getContextRoot();
if (contextRoot == null || contextRoot.startsWith("/") == false)
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRecordProcessorDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -33,7 +33,6 @@
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.recording.RecordProcessor;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that sets the record processors for each endpoint
@@ -52,7 +51,7 @@
}
@Override
- public void start(Deployment dep, WSFRuntime runtime)
+ public void start(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
@@ -78,7 +77,7 @@
}
@Override
- public void destroy(Deployment dep, WSFRuntime runtime)
+ public void destroy(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/EndpointRegistryDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -21,32 +21,42 @@
*/
package org.jboss.wsf.framework.deployment;
-import org.jboss.wsf.spi.WSFRuntime;
+import org.jboss.wsf.spi.management.EndpointRegistry;
+import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
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.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
/**
* A deployer that registers the endpoints
*
* @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
*/
public class EndpointRegistryDeploymentAspect extends DeploymentAspect
{
- public void create(Deployment dep, WSFRuntime runtime)
- {
+ private EndpointRegistry registry;
+
+ public void create(Deployment dep)
+ {
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ if (registry == null)
+ registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
- runtime.getEndpointRegistry().register(ep);
+ registry.register(ep);
}
}
- public void destroy(Deployment dep, WSFRuntime runtime)
+ public void destroy(Deployment dep)
{
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ if (registry == null)
+ registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
{
- runtime.getEndpointRegistry().unregister(ep);
+ registry.unregister(ep);
}
}
}
Deleted: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/HttpTransportDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -1,95 +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.framework.deployment;
-
-import org.jboss.wsf.spi.ComposableRuntime;
-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.Endpoint;
-import org.jboss.wsf.spi.transport.*;
-
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * Invokes a HTTP {@link org.jboss.wsf.spi.transport.TransportManager}
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author Heiko.Braun(a)jboss.com
- *
- * @since 19-May-2007
- */
-public class HttpTransportDeploymentAspect extends DeploymentAspect
-{
- @Override
- public void create(Deployment dep, WSFRuntime runtime)
- {
- TransportManagerFactory tmf = ((ComposableRuntime)runtime).getTransportManagerFactory();
- TransportManager httpTransport = tmf.createTransportManager(Protocol.HTTP);
-
- // Context root
- String contextRoot = dep.getService().getContextRoot();
- if (contextRoot == null)
- throw new IllegalStateException("Cannot obtain context root");
-
- // Setup transport for each endpoint
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- String urlPattern = ep.getURLPattern();
- if (urlPattern == null)
- throw new IllegalStateException("Cannot obtain url pattern");
- if (urlPattern.endsWith("/*"))
- urlPattern = urlPattern.substring(0, urlPattern.length() - 2);
-
- HttpSpec spec = new HttpSpec(contextRoot, urlPattern);
-
- // Propagate stack provided properties through TransportSpec (ServletClass and InitParameter)
- String servletClass = (String)dep.getProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
- if (servletClass == null) throw new IllegalStateException("Cannot obtain context property: " + HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS);
-
- Object ctxProps = dep.getProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS);
- Map ctxParams = ctxProps != null ? (Map)ctxProps:new HashMap();
-
- spec.setServletClass(servletClass);
- spec.getContextParameter().putAll(ctxParams);
-
- ListenerRef ref = httpTransport.createListener(ep, spec);
- ep.addAttachment(ListenerRef.class, ref);
- ep.setAddress(ref.getAddress().toString());
- }
- }
-
- @Override
- public void destroy(Deployment dep, WSFRuntime runtime)
- {
- TransportManagerFactory tmf = ((ComposableRuntime)runtime).getTransportManagerFactory();
- TransportManager httpTransport = tmf.createTransportManager(Protocol.HTTP);
-
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- ListenerRef listenerRef = ep.getAttachment(ListenerRef.class);
- httpTransport.destroyListener(listenerRef);
- }
- }
-
-}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/IdentityDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -21,7 +21,6 @@
*/
package org.jboss.wsf.framework.deployment;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -35,25 +34,25 @@
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
// does nothing
}
@Override
- public void destroy(Deployment dep, WSFRuntime runtime)
+ public void destroy(Deployment dep)
{
// does nothing
}
@Override
- public void start(Deployment dep, WSFRuntime runtime)
+ public void start(Deployment dep)
{
// does nothing
}
@Override
- public void stop(Deployment dep, WSFRuntime runtime)
+ public void stop(Deployment dep)
{
// does nothing
}
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -28,7 +28,6 @@
import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
-import org.jboss.wsf.spi.WSFRuntime;
/**
* A deployer that assigns the URLPattern to endpoints.
@@ -39,7 +38,7 @@
public class URLPatternDeploymentAspect extends DeploymentAspect
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
for (Endpoint ep : dep.getService().getEndpoints())
{
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/VirtualHostDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -24,7 +24,6 @@
import java.util.Arrays;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
@@ -40,7 +39,7 @@
{
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
String[] virtualHosts = dep.getService().getVirtualHosts();
if (virtualHosts == null)
Modified: framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
--- framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2008-11-03 09:12:53 UTC (rev 8613)
+++ framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2008-11-03 09:15:12 UTC (rev 8614)
@@ -34,7 +34,6 @@
import org.dom4j.io.XMLWriter;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.WSFRuntime;
import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -70,7 +69,7 @@
}
@Override
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
String typeStr = dep.getType().toString();
if (typeStr.endsWith("EJB21"))
16 years, 1 month
JBossWS SVN: r8613 - common/trunk/src/main/java/org/jboss/wsf/common/servlet.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-03 04:12:53 -0500 (Mon, 03 Nov 2008)
New Revision: 8613
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java
Log:
[JBWS-2338] svn merge -r 8565:8567 https://svn.jboss.org/repos/jbossws/common/branches/ropalka
Modified: common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java 2008-11-03 09:10:04 UTC (rev 8612)
+++ common/trunk/src/main/java/org/jboss/wsf/common/servlet/AbstractEndpointServlet.java 2008-11-03 09:12:53 UTC (rev 8613)
@@ -154,8 +154,7 @@
if (this.endpoint.getState() != EndpointState.STARTED) // [JBWS-2338] TODO fix this hack preventing exceptions
{
- this.aspectsManager.create(dep, null);
- this.aspectsManager.start(dep, null);
+ this.aspectsManager.deploy(dep);
}
}
}
@@ -175,8 +174,7 @@
{
try
{
- this.aspectsManager.stop(dep, null);
- this.aspectsManager.destroy(dep, null);
+ this.aspectsManager.undeploy(dep);
}
finally
{
16 years, 1 month
JBossWS SVN: r8612 - in spi/trunk/src/main/java/org/jboss/wsf/spi: deployment and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-11-03 04:10:04 -0500 (Mon, 03 Nov 2008)
New Revision: 8612
Removed:
spi/trunk/src/main/java/org/jboss/wsf/spi/ComposableRuntime.java
spi/trunk/src/main/java/org/jboss/wsf/spi/RuntimeAware.java
spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntime.java
spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntimeLocator.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentLifecycle.java
spi/trunk/src/main/java/org/jboss/wsf/spi/transport/
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
Log:
[JBWS-2338] svn merge -r 8564:8565 https://svn.jboss.org/repos/jbossws/spi/branches/ropalka
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/ComposableRuntime.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/ComposableRuntime.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/ComposableRuntime.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -1,58 +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.spi;
-
-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.TransportManager;
-import org.jboss.wsf.spi.transport.TransportManagerFactory;
-
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface ComposableRuntime
-{
- void setTransportManagerFactory(TransportManagerFactory factory);
-
- TransportManagerFactory getTransportManagerFactory();
-
- void setEndpointRegistry(EndpointRegistry endpointRegistry);
-
- EndpointRegistry getEndpointRegistry();
-
- void setDeploymentAspectManager(DeploymentAspectManager deploymentManager);
-
- DeploymentAspectManager getDeploymentAspectManager();
-
- void setRequestHandlerFactory(RequestHandlerFactory factory);
-
- RequestHandlerFactory getRequestHandlerFactory();
-
- void setInvocationHandlerFactory(InvocationHandlerFactory factory);
-
- InvocationHandlerFactory getInvocationHandlerFactory();
-
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/RuntimeAware.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/RuntimeAware.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/RuntimeAware.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -1,30 +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.spi;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface RuntimeAware
-{
- void setRuntimeAssociation(WSFRuntime runtime);
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntime.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntime.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntime.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -1,35 +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.spi;
-
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface WSFRuntime extends ComposableRuntime
-{
- void create(Deployment deployment);
- void start(Deployment deployment);
- void stop(Deployment deployment);
- void destroy(Deployment deployment);
-}
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntimeLocator.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntimeLocator.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/WSFRuntimeLocator.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -1,35 +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.spi;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface WSFRuntimeLocator
-{
- /**
- * Locate a web service runtime by logical name
- * @param runtimeName
- * @return
- */
- WSFRuntime locateRuntime(String runtimeName);
-}
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspect.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -26,8 +26,6 @@
import java.util.StringTokenizer;
import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.WSFRuntime;
-import org.jboss.wsf.spi.RuntimeAware;
/**
* A deployment aspect that does nothing.
@@ -38,7 +36,7 @@
* @author Thomas.Diesler(a)jboss.com
* @since 20-Apr-2007
*/
-public abstract class DeploymentAspect implements DeploymentLifecycle
+public abstract class DeploymentAspect
{
// provide logging
protected final Logger log = Logger.getLogger(getClass());
@@ -68,21 +66,20 @@
this.requires = requires;
}
- public void create(Deployment dep, WSFRuntime runtime)
+ public void create(Deployment dep)
{
-
}
- public void destroy(Deployment dep, WSFRuntime runtime)
+ public void destroy(Deployment dep)
{
}
- public void start(Deployment dep, WSFRuntime runtime)
+ public void start(Deployment dep)
{
}
- public void stop(Deployment dep, WSFRuntime runtime)
- {
+ public void stop(Deployment dep)
+ {
}
public Set<String> getProvidesAsSet()
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentAspectManager.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -24,15 +24,13 @@
import java.util.List;
/**
- * Process an ordered chain of {@link org.jboss.wsf.spi.deployment.DeploymentAspect}'s
- * on a {@link org.jboss.wsf.spi.deployment.DeploymentLifecycle}
+ * A general service deployment manager.
*
* @author Thomas.Diesler(a)jboss.com
- * @author Heiko.Braun(a)jboss.com
*
* @since 20-Apr-2007
*/
-public interface DeploymentAspectManager extends DeploymentLifecycle
+public interface DeploymentAspectManager
{
/** Get the name for this aspect manager */
String getName();
@@ -48,5 +46,10 @@
/** Set the list of registered deployment aspects */
void setDeploymentAspects(List<DeploymentAspect> aspects);
+
+ /** Deploy a web service */
+ void deploy(Deployment dep);
+
+ /** Undeploy a web service */
+ void undeploy(Deployment dep);
}
-
Deleted: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentLifecycle.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentLifecycle.java 2008-10-31 09:07:06 UTC (rev 8611)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/DeploymentLifecycle.java 2008-11-03 09:10:04 UTC (rev 8612)
@@ -1,38 +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.spi.deployment;
-
-import org.jboss.wsf.spi.WSFRuntime;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface DeploymentLifecycle
-{
- void create(Deployment dep, WSFRuntime runtime);
-
- void start(Deployment dep, WSFRuntime runtime);
-
- void stop(Deployment dep, WSFRuntime runtime);
-
- void destroy(Deployment dep, WSFRuntime runtime);
-}
16 years, 1 month