Author: thomas.diesler(a)jboss.com
Date: 2006-12-21 09:41:02 -0500 (Thu, 21 Dec 2006)
New Revision: 1700
Added:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
Removed:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
Log:
partial commit
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-12-21
14:40:58 UTC (rev 1699)
+++
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractDeployer.java 2006-12-21
14:41:02 UTC (rev 1700)
@@ -28,7 +28,7 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.kernel.spi.registry.KernelRegistry;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
+import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
import org.jboss.ws.core.server.KernelLocator;
import org.jboss.ws.core.server.ServiceEndpointDeployer;
import org.jboss.ws.core.server.UnifiedDeploymentInfo;
@@ -153,10 +153,10 @@
return (ServiceEndpointDeployer)entry.getTarget();
}
- protected JBoss50ServiceEndpointPublisher getServiceEndpointPublisher()
+ protected ServiceEndpointPublisher getServiceEndpointPublisher()
{
KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry = registry.getEntry(ServiceEndpointPublisher.BEAN_NAME);
- return (JBoss50ServiceEndpointPublisher)entry.getTarget();
+ KernelRegistryEntry entry =
registry.getEntry(AbstractServiceEndpointPublisher.BEAN_NAME);
+ return (ServiceEndpointPublisher)entry.getTarget();
}
}
Modified:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-21
14:40:58 UTC (rev 1699)
+++
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/AbstractJSEDeployer.java 2006-12-21
14:41:02 UTC (rev 1700)
@@ -33,7 +33,7 @@
import org.jboss.metadata.NameValuePair;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
+import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
/**
* An abstract deployer for JSE Endpoints
@@ -90,7 +90,7 @@
if (isAlreadyModified(servlet) == false)
{
servlet.setServletClass(serviceEndpointServlet);
- NameValuePair initParam = new
NameValuePair(ServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL,
servletClassName);
+ NameValuePair initParam = new
NameValuePair(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL,
servletClassName);
servlet.addInitParam(initParam);
}
}
@@ -111,7 +111,7 @@
while (itParams.hasNext())
{
NameValuePair pair = (NameValuePair)itParams.next();
- if
(ServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
+ if
(AbstractServiceEndpointPublisher.INIT_PARAM_SERVICE_ENDPOINT_IMPL.equals(pair.getName()))
return true;
}
return false;
Deleted:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java 2006-12-21
14:40:58 UTC (rev 1699)
+++
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java 2006-12-21
14:41:02 UTC (rev 1700)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.ws.integration.jboss50;
-
-// $Id$
-
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jboss.deployers.plugins.structure.AbstractDeploymentContext;
-import org.jboss.deployers.spi.deployment.MainDeployer;
-import org.jboss.deployers.spi.structure.DeploymentContext;
-import org.jboss.deployers.spi.structure.DeploymentState;
-import org.jboss.logging.Logger;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.ws.core.server.ServiceEndpointPublisher;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-
-/**
- * Publish the HTTP service endpoint to Tomcat
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 12-May-2006
- */
-public class JBoss50ServiceEndpointPublisher extends ServiceEndpointPublisher
-{
- // provide logging
- private static Logger log = Logger.getLogger(JBoss50ServiceEndpointPublisher.class);
-
- private MainDeployer mainDeployer;
- private Map<String, DeploymentContext> contextMap = new HashMap<String,
DeploymentContext>();
-
- public MainDeployer getMainDeployer()
- {
- return mainDeployer;
- }
-
- public void setMainDeployer(MainDeployer mainDeployer)
- {
- this.mainDeployer = mainDeployer;
- }
-
- public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
- {
- URL warURL = udi.expandedWebApp;
- log.debug("publishServiceEndpoint: " + warURL);
-
- rewriteWebXml(warURL);
- DeploymentContext context = createDeploymentContext(warURL);
-
- mainDeployer.addDeploymentContext(context);
- mainDeployer.process();
-
- contextMap.put(warURL.toExternalForm(), context);
- return "OK";
- }
-
- public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
- {
- URL warURL = udi.expandedWebApp;
- log.debug("destroyServiceEndpoint: " + warURL);
-
- DeploymentContext context = contextMap.get(warURL.toExternalForm());
- if (context != null)
- {
- context.setState(DeploymentState.UNDEPLOYING);
- mainDeployer.process();
- mainDeployer.removeDeploymentContext(context.getName());
-
- contextMap.remove(warURL.toExternalForm());
- }
- return "OK";
- }
-
- private DeploymentContext createDeploymentContext(URL warURL) throws Exception
- {
- VirtualFile file = VFS.getRoot(warURL);
- return new AbstractDeploymentContext(file);
- }
-}
Copied:
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java
(from rev 1689,
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java)
===================================================================
---
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/JBoss50ServiceEndpointPublisher.java 2006-12-21
13:46:51 UTC (rev 1689)
+++
branches/tdiesler/trunk/integration-jboss50/src/main/java/org/jboss/ws/integration/jboss50/ServiceEndpointPublisher.java 2006-12-21
14:41:02 UTC (rev 1700)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.ws.integration.jboss50;
+
+// $Id$
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.plugins.structure.AbstractDeploymentContext;
+import org.jboss.deployers.spi.deployment.MainDeployer;
+import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.deployers.spi.structure.DeploymentState;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.ws.core.server.AbstractServiceEndpointPublisher;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+
+/**
+ * Publish the HTTP service endpoint to Tomcat
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class ServiceEndpointPublisher extends AbstractServiceEndpointPublisher
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(ServiceEndpointPublisher.class);
+
+ private MainDeployer mainDeployer;
+ private Map<String, DeploymentContext> contextMap = new HashMap<String,
DeploymentContext>();
+
+ public MainDeployer getMainDeployer()
+ {
+ return mainDeployer;
+ }
+
+ public void setMainDeployer(MainDeployer mainDeployer)
+ {
+ this.mainDeployer = mainDeployer;
+ }
+
+ public String publishServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
+ {
+ URL warURL = udi.expandedWebApp;
+ log.debug("publishServiceEndpoint: " + warURL);
+
+ rewriteWebXml(warURL);
+ DeploymentContext context = createDeploymentContext(warURL);
+
+ mainDeployer.addDeploymentContext(context);
+ mainDeployer.process();
+
+ contextMap.put(warURL.toExternalForm(), context);
+ return "OK";
+ }
+
+ public String destroyServiceEndpoint(UnifiedDeploymentInfo udi) throws Exception
+ {
+ URL warURL = udi.expandedWebApp;
+ log.debug("destroyServiceEndpoint: " + warURL);
+
+ DeploymentContext context = contextMap.get(warURL.toExternalForm());
+ if (context != null)
+ {
+ context.setState(DeploymentState.UNDEPLOYING);
+ mainDeployer.process();
+ mainDeployer.removeDeploymentContext(context.getName());
+
+ contextMap.remove(warURL.toExternalForm());
+ }
+ return "OK";
+ }
+
+ private DeploymentContext createDeploymentContext(URL warURL) throws Exception
+ {
+ VirtualFile file = VFS.getRoot(warURL);
+ return new AbstractDeploymentContext(file);
+ }
+}