Author: richard.opalka(a)jboss.com
Date: 2009-06-11 06:37:21 -0400 (Thu, 11 Jun 2009)
New Revision: 10178
Removed:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
Log:
[JBWS-2674][JBWS-2332] removing current Endpoint API impl
Deleted:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java 2009-06-10
14:50:42 UTC (rev 10177)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/deployer/WebServiceMainDeployer.java 2009-06-11
10:37:21 UTC (rev 10178)
@@ -1,50 +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.deployer;
-
-/**
- * The main web service deployer
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 24-Apr-2007
- */
-public class WebServiceMainDeployer extends AbstractWebServiceDeployer
-{
- private int relOrderJSE;
- private int relOrderEJB;
-
- public void setRelOrderEJB(int relOrderEJB)
- {
- this.relOrderEJB = relOrderEJB;
- }
-
- public void setRelOrderJSE(int relOrderJSE)
- {
- this.relOrderJSE = relOrderJSE;
- }
-
- @Override
- public int getRelativeOrder()
- {
- return Math.max(relOrderEJB, relOrderJSE) + 1;
- }
-}
Deleted:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java 2009-06-10
14:50:42 UTC (rev 10177)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DeploymentAspectHttpServer.java 2009-06-11
10:37:21 UTC (rev 10178)
@@ -1,139 +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.HashMap;
-import java.util.Map;
-
-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
-{
- private Map<String,Deployment> deployments = new
HashMap<String,Deployment>();
-
- /** 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)
- {
- String contextRoot = context.getContextRoot();
- 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 deployment =
depModelFactory.newDeployment("endpoint-deployment",
implClass.getClassLoader());
- deployment.setRuntimeClassLoader(deployment.getInitialClassLoader());
-
- // Create/Setup the service
- Service service = deployment.getService();
- service.setContextRoot(contextRoot);
-
- // Create/Setup the endpoint
- org.jboss.wsf.spi.deployment.Endpoint ep =
depModelFactory.newEndpoint(implClass.getName());
- service.addEndpoint(ep);
-
- // Deploy using deployment aspects
- getDeploymentAspectManager().deploy(deployment);
- deployments.put(contextRoot, deployment);
- }
- 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)
- {
- String contextRoot = context.getContextRoot();
-
- try
- {
- Deployment deployment = deployments.remove(contextRoot);
- if (deployment != null)
- getDeploymentAspectManager().undeploy(deployment);
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new WebServiceException(ex);
- }
- }
-
- private DeploymentAspectManager getDeploymentAspectManager()
- {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- DeploymentAspectManagerFactory depManagerFactory =
spiProvider.getSPI(DeploymentAspectManagerFactory.class);
- DeploymentAspectManager depManager =
depManagerFactory.getDeploymentAspectManager("WSDeploymentAspectManagerEndpointAPI");
- return depManager;
- }
-
- private Class getImplementorClass(Endpoint endpoint)
- {
- Object implementor = endpoint.getImplementor();
- Class implClass = (implementor instanceof Class ? (Class)implementor :
implementor.getClass());
- return implClass;
- }
-}
Deleted:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java 2009-06-10
14:50:42 UTC (rev 10177)
+++
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/wsf/container/jboss50/transport/DynamicEndpointDeploymentAspect.java 2009-06-11
10:37:21 UTC (rev 10178)
@@ -1,143 +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.HashMap;
-import java.util.Map;
-
-import javax.xml.ws.WebServiceException;
-
-import org.jboss.classloading.spi.dependency.ClassLoading;
-import org.jboss.classloading.spi.dependency.Module;
-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;
-
- private Map<String,AbstractDeployment> deployments = new
HashMap<String,AbstractDeployment>();
-
- 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");
-
- ClassLoader epLoader = dep.getRuntimeClassLoader();
-
- try
- {
- webMetaDataModifier.modifyMetaData(dep);
-
- String contextRoot = dep.getService().getContextRoot();
- AbstractDeployment deployment =
createSimpleDeployment("http://jaxws-endpoint-api" + contextRoot);
- MutableAttachments mutableAttachments =
(MutableAttachments)deployment.getPredeterminedManagedObjects();
- mutableAttachments.addAttachment(WebMetaDataModifier.PROPERTY_GENERATED_WEBAPP,
Boolean.TRUE);
- mutableAttachments.addAttachment("org.jboss.web.explicitDocBase",
"/", String.class);
- mutableAttachments.addAttachment(ClassLoaderFactory.class, new
ContextClassLoaderFactory(epLoader));
- mutableAttachments.addAttachment(JBossWebMetaData.class, jbwmd);
- mutableAttachments.addAttachment(Module.class,
ClassLoading.getModuleForClassLoader(epLoader));
- mainDeployer.deploy(deployment);
-
- deployments.put(contextRoot, deployment);
- }
- catch (Exception ex)
- {
- WSFDeploymentException.rethrow(ex);
- }
- }
-
- public void destroy(Deployment dep)
- {
- try
- {
- String contextRoot = dep.getService().getContextRoot();
- AbstractDeployment deployment = deployments.remove(contextRoot);
- if (deployment != null)
- 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
- {
- private ClassLoader classloader;
-
- public ContextClassLoaderFactory(ClassLoader classloader)
- {
- this.classloader = classloader;
- }
-
- public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
- {
- return classloader;
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- classloader = null;
- }
- }
-}
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
===================================================================
---
container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2009-06-10
14:50:42 UTC (rev 10177)
+++
container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2009-06-11
10:37:21 UTC (rev 10178)
@@ -12,9 +12,6 @@
<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"/>
-
<!-- An abstraction of server configuration aspects. -->
<bean name="WSServerConfig"
class="org.jboss.wsf.container.jboss50.deployer.ServerConfigImpl">
<property name="mbeanServer"><inject
bean="WSMBeanServerLocator"
property="mbeanServer"/></property>
@@ -211,9 +208,6 @@
<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
@@ -366,23 +360,4 @@
</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="WSVirtualHostDeploymentAspect"/>
- <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>