Author: thomas.diesler(a)jboss.com
Date: 2007-05-09 08:40:45 -0400 (Wed, 09 May 2007)
New Revision: 3016
Added:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicLifecycleHandler.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicService.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeployerManager.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentContext.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicEndpointRegistry.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicServerConfig.java
Removed:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
Modified:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java
projects/wsintegration/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
Log:
Fix [JBWS-1115]
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicEndpoint.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicEndpoint.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,173 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.management.ObjectName;
+
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A general JAXWS endpoint.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpoint implements Endpoint
+{
+ private Service service;
+ private ObjectName name;
+ private Class endpointImpl;
+ private EndpointState state;
+ private RequestHandler requestHandler;
+ private InvocationHandler invocationHandler;
+ private LifecycleHandler lifecycleHandler;
+ private Map<Class, Object> metaData = new HashMap<Class, Object>();
+
+ public BasicEndpoint(Service service, Class impl)
+ {
+ this.service = service;
+ this.endpointImpl = impl;
+ this.state = EndpointState.UNDEFINED;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ this.service = service;
+ }
+
+ public Class getEndpointImpl()
+ {
+ return endpointImpl;
+ }
+
+ public void setEndpointImpl(Class endpointImpl)
+ {
+ this.endpointImpl = endpointImpl;
+ }
+
+ public EndpointState getState()
+ {
+ return state;
+ }
+
+ public void setState(EndpointState state)
+ {
+ this.state = state;
+ }
+
+ public ObjectName getName()
+ {
+ return name;
+ }
+
+ public void setName(ObjectName name)
+ {
+ this.name = name;
+ }
+
+ public RequestHandler getRequestHandler()
+ {
+ return requestHandler;
+ }
+
+ public void setRequestHandler(RequestHandler handler)
+ {
+ this.requestHandler = handler;
+ }
+
+ public LifecycleHandler getLifecycleHandler()
+ {
+ return lifecycleHandler;
+ }
+
+ public void setLifecycleHandler(LifecycleHandler handler)
+ {
+ this.lifecycleHandler = handler;
+ }
+
+ public InvocationHandler getInvocationHandler()
+ {
+ return invocationHandler;
+ }
+
+ public void setInvocationHandler(InvocationHandler handler)
+ {
+ this.invocationHandler = handler;
+ }
+
+ public <T> T addMetaData(Class<T> key, Object value)
+ {
+ return (T)metaData.put(key, value);
+ }
+
+ public <T> T getMetaData(Class<T> key)
+ {
+ return (T)metaData.get(key);
+ }
+
+ public <T> T removeMetaData(Class<T> key)
+ {
+ return (T)metaData.get(key);
+ }
+}
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicLifecycleHandler.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicLifecycleHandler.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicLifecycleHandler.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,79 @@
+/*
+ * 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;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.Endpoint.EndpointState;
+import org.jboss.ws.integration.invocation.InvocationHandler;
+
+/**
+ * A basic lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public class BasicLifecycleHandler implements LifecycleHandler
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ public void create(Endpoint endpoint)
+ {
+ log.debug("Create: " + endpoint.getName());
+
+ // Initialize the invoker
+ InvocationHandler invoker = endpoint.getInvocationHandler();
+ invoker.init(endpoint);
+
+ endpoint.setState(EndpointState.CREATED);
+ }
+
+ public void start(Endpoint endpoint)
+ {
+ log.debug("Start: " + endpoint.getName());
+
+ EndpointState state = endpoint.getState();
+ if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
+ throw new IllegalStateException("Cannot start endpoint in state: " +
state);
+
+ endpoint.setState(EndpointState.STARTED);
+ }
+
+ public void stop(Endpoint endpoint)
+ {
+ log.debug("Stop: " + endpoint.getName());
+
+ EndpointState state = endpoint.getState();
+ if (state != EndpointState.STARTED)
+ throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
+
+ endpoint.setState(EndpointState.STOPED);
+ }
+
+ public void destroy(Endpoint endpoint)
+ {
+ log.debug("Destroy: " + endpoint.getName());
+ endpoint.setState(EndpointState.DESTROYED);
+ }
+}
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicService.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicService.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/BasicService.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,103 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.ws.integration.deployment.Deployment;
+
+/**
+ * A general service.
+ *
+ * Maintains a named set of Endpoints
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicService implements Service
+{
+ private Deployment unit;
+ private List<Endpoint> endpoints = new LinkedList<Endpoint>();
+
+ public BasicService(Deployment unit)
+ {
+ this.unit = unit;
+ this.unit.setService(this);
+ }
+
+ public Deployment getDeployment()
+ {
+ return unit;
+ }
+
+ public void setDeployment(Deployment unit)
+ {
+ this.unit = unit;
+ }
+
+ public void addEndpoint(Endpoint endpoint)
+ {
+ endpoints.add(endpoint);
+ }
+
+ public List<Endpoint> getEndpoints()
+ {
+ return endpoints;
+ }
+}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/EndpointImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,173 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.management.ObjectName;
-
-import org.jboss.ws.integration.invocation.InvocationHandler;
-
-/**
- * A general JAXWS endpoint.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class EndpointImpl implements Endpoint
-{
- private Service service;
- private ObjectName name;
- private Class endpointImpl;
- private EndpointState state;
- private RequestHandler requestHandler;
- private InvocationHandler invocationHandler;
- private LifecycleHandler lifecycleHandler;
- private Map<Class, Object> metaData = new HashMap<Class, Object>();
-
- public EndpointImpl(Service service, Class impl)
- {
- this.service = service;
- this.endpointImpl = impl;
- this.state = EndpointState.UNDEFINED;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- this.service = service;
- }
-
- public Class getEndpointImpl()
- {
- return endpointImpl;
- }
-
- public void setEndpointImpl(Class endpointImpl)
- {
- this.endpointImpl = endpointImpl;
- }
-
- public EndpointState getState()
- {
- return state;
- }
-
- public void setState(EndpointState state)
- {
- this.state = state;
- }
-
- public ObjectName getName()
- {
- return name;
- }
-
- public void setName(ObjectName name)
- {
- this.name = name;
- }
-
- public RequestHandler getRequestHandler()
- {
- return requestHandler;
- }
-
- public void setRequestHandler(RequestHandler handler)
- {
- this.requestHandler = handler;
- }
-
- public LifecycleHandler getLifecycleHandler()
- {
- return lifecycleHandler;
- }
-
- public void setLifecycleHandler(LifecycleHandler handler)
- {
- this.lifecycleHandler = handler;
- }
-
- public InvocationHandler getInvocationHandler()
- {
- return invocationHandler;
- }
-
- public void setInvocationHandler(InvocationHandler handler)
- {
- this.invocationHandler = handler;
- }
-
- public <T> T addMetaData(Class<T> key, Object value)
- {
- return (T)metaData.put(key, value);
- }
-
- public <T> T getMetaData(Class<T> key)
- {
- return (T)metaData.get(key);
- }
-
- public <T> T removeMetaData(Class<T> key)
- {
- return (T)metaData.get(key);
- }
-}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/LifecycleHandlerImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,79 +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;
-
-//$Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.Endpoint.EndpointState;
-import org.jboss.ws.integration.invocation.InvocationHandler;
-
-/**
- * A basic lifecycle handler
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 31-Oct-2006
- */
-public class LifecycleHandlerImpl implements LifecycleHandler
-{
- // provide logging
- protected final Logger log = Logger.getLogger(getClass());
-
- public void create(Endpoint endpoint)
- {
- log.debug("Create: " + endpoint.getName());
-
- // Initialize the invoker
- InvocationHandler invoker = endpoint.getInvocationHandler();
- invoker.init(endpoint);
-
- endpoint.setState(EndpointState.CREATED);
- }
-
- public void start(Endpoint endpoint)
- {
- log.debug("Start: " + endpoint.getName());
-
- EndpointState state = endpoint.getState();
- if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
- throw new IllegalStateException("Cannot start endpoint in state: " +
state);
-
- endpoint.setState(EndpointState.STARTED);
- }
-
- public void stop(Endpoint endpoint)
- {
- log.debug("Stop: " + endpoint.getName());
-
- EndpointState state = endpoint.getState();
- if (state != EndpointState.STARTED)
- throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
-
- endpoint.setState(EndpointState.STOPED);
- }
-
- public void destroy(Endpoint endpoint)
- {
- log.debug("Destroy: " + endpoint.getName());
- endpoint.setState(EndpointState.DESTROYED);
- }
-}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/ServiceImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,103 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration;
-
-// $Id$
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.ws.integration.deployment.Deployment;
-
-/**
- * A general service.
- *
- * Maintains a named set of Endpoints
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class ServiceImpl implements Service
-{
- private Deployment unit;
- private List<Endpoint> endpoints = new LinkedList<Endpoint>();
-
- public ServiceImpl(Deployment unit)
- {
- this.unit = unit;
- this.unit.setService(this);
- }
-
- public Deployment getDeployment()
- {
- return unit;
- }
-
- public void setDeployment(Deployment unit)
- {
- this.unit = unit;
- }
-
- public void addEndpoint(Endpoint endpoint)
- {
- endpoints.add(endpoint);
- }
-
- public List<Endpoint> getEndpoints()
- {
- return endpoints;
- }
-}
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeployerManager.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeployerManager.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeployerManager.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,184 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+// $Id$
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.deployment.Deployment.DeploymentState;
+
+/**
+ * A general service deployment manger.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeployerManager implements DeployerManager
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(BasicDeployerManager.class);
+
+
+ private List<Deployer> deployers = new LinkedList<Deployer>();
+
+ public List<Deployer> getDeployers()
+ {
+ return deployers;
+ }
+
+ public void setDeployers(List<Deployer> deployers)
+ {
+ this.deployers = deployers;
+ }
+
+ /**
+ * 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
+ for (int i = 0; i < deployers.size(); i++)
+ {
+ Deployer deployer = deployers.get(i);
+ logInvocation(deployer, "Create");
+ deployer.create(dep);
+ }
+
+ dep.setState(DeploymentState.CREATED);
+
+ // start the deployment
+ for (int i = 0; i < deployers.size(); i++)
+ {
+ Deployer deployer = deployers.get(i);
+ try
+ {
+ logInvocation(deployer, "Start");
+ deployer.start(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ while (i-- >= 0)
+ {
+ // destroy the deployment
+ failsafeDestroy(deployer, dep);
+ }
+ throw rte;
+ }
+ }
+
+ dep.setState(DeploymentState.STARTED);
+ }
+
+ public void undeploy(Deployment dep)
+ {
+ // stop the deployment
+ for (int i = deployers.size(); 0 < i; i--)
+ {
+ Deployer deployer = deployers.get(i - 1);
+ failsafeStop(deployer, dep);
+ }
+
+ dep.setState(DeploymentState.STOPED);
+
+ // destroy the deployment
+ for (int i = deployers.size(); 0 < i; i--)
+ {
+ Deployer deployer = deployers.get(i - 1);
+ failsafeDestroy(deployer, dep);
+ }
+
+ dep.setState(DeploymentState.DESTROYED);
+ }
+
+ private void failsafeStop(Deployer deployer, Deployment dep)
+ {
+ try
+ {
+ logInvocation(deployer, "Stop");
+ deployer.stop(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void failsafeDestroy(Deployer deployer, Deployment dep)
+ {
+ try
+ {
+ logInvocation(deployer, "Destroy");
+ deployer.destroy(dep);
+ }
+ catch (RuntimeException rte)
+ {
+ WSDeploymentException.rethrow(rte);
+ }
+ }
+
+ private void logInvocation(Deployer deployer, String method)
+ {
+ String name = deployer.getClass().getName();
+ name = name.substring(name.lastIndexOf(".") + 1);
+ log.debug(name + ":" + method);
+ }
+}
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentContext.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentContext.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentContext.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,82 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A general web service deployment context.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeploymentContext implements DeploymentContext
+{
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(clazz);
+ }
+
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T)attachments.put(clazz, obj);
+ }
+}
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/BasicDeploymentImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,140 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.deployment;
+
+//$Id$
+
+import org.jboss.ws.integration.BasicService;
+import org.jboss.ws.integration.Service;
+
+/**
+ * A general web service deployment dep.
+ *
+ * It has no notion of J2EE deployment packages.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicDeploymentImpl implements Deployment
+{
+ // The context for this deployment dep
+ private DeploymentContext context;
+ // A deployment has one service
+ private Service service;
+ // The type of this deployment
+ private DeploymentType type;
+ // The state for this deployment
+ private DeploymentState state;
+ // The deployment class loader
+ private ClassLoader classLoader;
+
+ public BasicDeploymentImpl()
+ {
+ context = new BasicDeploymentContext();
+ service = new BasicService(this);
+ state = DeploymentState.UNDEFINED;
+ }
+
+ public DeploymentContext getContext()
+ {
+ return context;
+ }
+
+ public void setContext(DeploymentContext context)
+ {
+ this.context = context;
+ }
+
+ public void setClassLoader(ClassLoader loader)
+ {
+ this.classLoader = loader;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ public Service getService()
+ {
+ return service;
+ }
+
+ public void setService(Service service)
+ {
+ this.service = service;
+ }
+
+ public DeploymentState getState()
+ {
+ return state;
+ }
+
+ public void setState(DeploymentState deploymentState)
+ {
+ this.state = deploymentState;
+ }
+
+ public DeploymentType getType()
+ {
+ return type;
+ }
+
+ public void setType(DeploymentType deploymentType)
+ {
+ this.type = deploymentType;
+ }
+}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeployerManagerImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,184 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration.deployment;
-
-// $Id$
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.deployment.Deployment.DeploymentState;
-
-/**
- * A general service deployment manger.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class DeployerManagerImpl implements DeployerManager
-{
- // provide logging
- private static final Logger log = Logger.getLogger(DeployerManagerImpl.class);
-
-
- private List<Deployer> deployers = new LinkedList<Deployer>();
-
- public List<Deployer> getDeployers()
- {
- return deployers;
- }
-
- public void setDeployers(List<Deployer> deployers)
- {
- this.deployers = deployers;
- }
-
- /**
- * 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
- for (int i = 0; i < deployers.size(); i++)
- {
- Deployer deployer = deployers.get(i);
- logInvocation(deployer, "Create");
- deployer.create(dep);
- }
-
- dep.setState(DeploymentState.CREATED);
-
- // start the deployment
- for (int i = 0; i < deployers.size(); i++)
- {
- Deployer deployer = deployers.get(i);
- try
- {
- logInvocation(deployer, "Start");
- deployer.start(dep);
- }
- catch (RuntimeException rte)
- {
- while (i-- >= 0)
- {
- // destroy the deployment
- failsafeDestroy(deployer, dep);
- }
- throw rte;
- }
- }
-
- dep.setState(DeploymentState.STARTED);
- }
-
- public void undeploy(Deployment dep)
- {
- // stop the deployment
- for (int i = deployers.size(); 0 < i; i--)
- {
- Deployer deployer = deployers.get(i - 1);
- failsafeStop(deployer, dep);
- }
-
- dep.setState(DeploymentState.STOPED);
-
- // destroy the deployment
- for (int i = deployers.size(); 0 < i; i--)
- {
- Deployer deployer = deployers.get(i - 1);
- failsafeDestroy(deployer, dep);
- }
-
- dep.setState(DeploymentState.DESTROYED);
- }
-
- private void failsafeStop(Deployer deployer, Deployment dep)
- {
- try
- {
- logInvocation(deployer, "Stop");
- deployer.stop(dep);
- }
- catch (RuntimeException rte)
- {
- WSDeploymentException.rethrow(rte);
- }
- }
-
- private void failsafeDestroy(Deployer deployer, Deployment dep)
- {
- try
- {
- logInvocation(deployer, "Destroy");
- deployer.destroy(dep);
- }
- catch (RuntimeException rte)
- {
- WSDeploymentException.rethrow(rte);
- }
- }
-
- private void logInvocation(Deployer deployer, String method)
- {
- String name = deployer.getClass().getName();
- name = name.substring(name.lastIndexOf(".") + 1);
- log.debug(name + ":" + method);
- }
-}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentContextImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,82 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration.deployment;
-
-//$Id$
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * A general web service deployment context.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class DeploymentContextImpl implements DeploymentContext
-{
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
-
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(clazz);
- }
-
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- return (T)attachments.put(clazz, obj);
- }
-}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/deployment/DeploymentImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,140 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration.deployment;
-
-//$Id$
-
-import org.jboss.ws.integration.ServiceImpl;
-import org.jboss.ws.integration.Service;
-
-/**
- * A general web service deployment dep.
- *
- * It has no notion of J2EE deployment packages.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class DeploymentImpl implements Deployment
-{
- // The context for this deployment dep
- private DeploymentContext context;
- // A deployment has one service
- private Service service;
- // The type of this deployment
- private DeploymentType type;
- // The state for this deployment
- private DeploymentState state;
- // The deployment class loader
- private ClassLoader classLoader;
-
- public DeploymentImpl()
- {
- context = new DeploymentContextImpl();
- service = new ServiceImpl(this);
- state = DeploymentState.UNDEFINED;
- }
-
- public DeploymentContext getContext()
- {
- return context;
- }
-
- public void setContext(DeploymentContext context)
- {
- this.context = context;
- }
-
- public void setClassLoader(ClassLoader loader)
- {
- this.classLoader = loader;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- public Service getService()
- {
- return service;
- }
-
- public void setService(Service service)
- {
- this.service = service;
- }
-
- public DeploymentState getState()
- {
- return state;
- }
-
- public void setState(DeploymentState deploymentState)
- {
- this.state = deploymentState;
- }
-
- public DeploymentType getType()
- {
- return type;
- }
-
- public void setType(DeploymentType deploymentType)
- {
- this.type = deploymentType;
- }
-}
Added:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicEndpointRegistry.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicEndpointRegistry.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicEndpointRegistry.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,135 @@
+/*
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
+ * Apache Software Foundation (
http://www.apache.org/)."
+ * Alternately, this acknowlegement may appear in the software itself,
+ * if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
+ * Foundation" must not be used to endorse or promote products derived
+ * from this software without prior written permission. For written
+ * permission, please contact apache(a)apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ * nor may "Apache" appear in their names without prior written
+ * permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <
http://www.apache.org/>.
+ */
+package org.jboss.ws.integration.management;
+
+// $Id$
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.Endpoint;
+
+/**
+ * A general endpoint registry.
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class BasicEndpointRegistry implements EndpointRegistry
+{
+ // provide logging
+ private static final Logger log = Logger.getLogger(BasicEndpointRegistry.class);
+
+ private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName,
Endpoint>();
+
+ public Endpoint getEndpoint(ObjectName epName)
+ {
+ if (epName == null)
+ throw new IllegalArgumentException("Endpoint name cannot be null");
+
+ if (isRegistered(epName) == false)
+ throw new IllegalStateException("Endpoint not registered: " +
epName);
+
+ Endpoint endpoint = endpoints.get(epName);
+ return endpoint;
+ }
+
+ public boolean isRegistered(ObjectName epName)
+ {
+ if (epName == null)
+ throw new IllegalArgumentException("Endpoint name cannot be null");
+
+ return endpoints.get(epName) != null;
+ }
+
+ public Set<ObjectName> getEndpoints()
+ {
+ return endpoints.keySet();
+ }
+
+ public void register(Endpoint endpoint)
+ {
+ if (endpoint == null)
+ throw new IllegalArgumentException("Endpoint cannot be null");
+
+ ObjectName epName = endpoint.getName();
+ if (epName == null)
+ throw new IllegalStateException("Endpoint name cannot be null for: " +
endpoint);
+
+ if (isRegistered(epName))
+ throw new IllegalStateException("Endpoint already registered: " +
epName);
+
+ log.info("register: " + epName);
+ endpoints.put(epName, endpoint);
+ }
+
+ public void unregister(Endpoint endpoint)
+ {
+ if (endpoint == null)
+ throw new IllegalArgumentException("Endpoint cannot be null");
+
+ ObjectName epName = endpoint.getName();
+ if (isRegistered(epName) == false)
+ throw new IllegalStateException("Endpoint not registered: " +
epName);
+
+ log.info("remove: " + epName);
+ endpoints.remove(epName);
+ }
+}
Property changes on:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicEndpointRegistry.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicServerConfig.java
(from rev 3013,
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java)
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicServerConfig.java
(rev 0)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/BasicServerConfig.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -0,0 +1,218 @@
+/*
+ * 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.management;
+
+//$Id$
+
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Iterator;
+import java.util.Set;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MBeanServerFactory;
+import javax.management.ObjectName;
+
+import org.jboss.logging.Logger;
+import org.jboss.ws.integration.ObjectNameFactory;
+
+/**
+ * JBoss specific implementation of a ServerConfig
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @author darran.lofthouse(a)jboss.com
+ * @since 08-May-2006
+ */
+public class BasicServerConfig implements ServerConfig
+{
+ private static final Logger log = Logger.getLogger(BasicServerConfig.class);
+
+ // The webservice host name that will be used when updating the wsdl
+ private String webServiceHost = UNDEFINED_HOSTNAME;
+ // The webservice port that will be used when updating the wsdl
+ private int webServicePort;
+ // The webservice port that will be used when updating the wsdl
+ private int webServiceSecurePort;
+ // Whether we should always modify the soap address to the deployed endpoing location
+ private boolean modifySOAPAddress;
+ // The MBeanServer
+ private MBeanServer server;
+
+ public String getWebServiceHost()
+ {
+ return webServiceHost;
+ }
+
+ public void setWebServiceHost(String host) throws UnknownHostException
+ {
+ if (host == null || host.trim().length() == 0)
+ {
+ log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
+ host = UNDEFINED_HOSTNAME;
+ }
+ if ("0.0.0.0".equals(host))
+ {
+ InetAddress localHost = InetAddress.getLocalHost();
+ log.debug("Using local host: " + localHost.getHostName());
+ host = localHost.getHostName();
+ }
+ this.webServiceHost = host;
+ }
+
+ public void setWebServicePort(int port)
+ {
+ this.webServicePort = port;
+ }
+
+ public void setWebServiceSecurePort(int port)
+ {
+ this.webServiceSecurePort = port;
+ }
+
+ public boolean isModifySOAPAddress()
+ {
+ return modifySOAPAddress;
+ }
+
+ public void setModifySOAPAddress(boolean modify)
+ {
+ this.modifySOAPAddress = modify;
+ }
+
+ public File getServerTempDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public File getServerDataDir()
+ {
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
+ File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
+ return tmpdir;
+ }
+ catch (JMException e)
+ {
+ return null;
+ }
+ }
+
+ public int getWebServicePort()
+ {
+ if (webServicePort <= 0)
+ webServicePort = getConnectorPort("HTTP/1.1", false);
+
+ if (webServicePort <= 0)
+ {
+ log.warn("Unable to calculate 'WebServicePort', using default
'8080'");
+ webServicePort = 8080;
+ }
+
+ return webServicePort;
+ }
+
+ public int getWebServiceSecurePort()
+ {
+ if (webServiceSecurePort <= 0)
+ webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
+
+ if (webServiceSecurePort <= 0)
+ {
+ log.warn("Unable to calculate 'WebServiceSecurePort', using default
'8443'");
+ webServiceSecurePort = 8443;
+ }
+
+ return webServiceSecurePort;
+ }
+
+ private int getConnectorPort(final String protocol, final boolean secure)
+ {
+ int port = -1;
+
+ try
+ {
+ MBeanServer server = getMBeanServer();
+ ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
+
+ Set connectorNames = server.queryNames(connectors, null);
+ for (Object current : connectorNames)
+ {
+ ObjectName currentName = (ObjectName)current;
+
+ try
+ {
+ int connectorPort = (Integer)server.getAttribute(currentName,
"port");
+ boolean connectorSecure = (Boolean)server.getAttribute(currentName,
"secure");
+ String connectorProtocol = (String)server.getAttribute(currentName,
"protocol");
+
+ if (protocol.equals(connectorProtocol) && secure ==
connectorSecure)
+ {
+ if (port > -1)
+ {
+ log.warn("Found multiple connectors for protocol='" +
protocol + "' and secure='" + secure + "', using first port
found '" + port + "'");
+ }
+ else
+ {
+ port = connectorPort;
+ }
+ }
+ }
+ catch (AttributeNotFoundException ignored)
+ {
+ }
+ }
+
+ return port;
+ }
+ catch (JMException e)
+ {
+ return -1;
+ }
+ }
+
+ private MBeanServer getMBeanServer()
+ {
+ if (server == null)
+ {
+ for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator();
i.hasNext();)
+ {
+ server = (MBeanServer)i.next();
+ }
+ }
+ return server;
+ }
+}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/EndpointRegistryImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,135 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
- * Apache Software Foundation (
http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache
Software
- * Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
- * permission, please contact apache(a)apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- * nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <
http://www.apache.org/>.
- */
-package org.jboss.ws.integration.management;
-
-// $Id$
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.Endpoint;
-
-/**
- * A general endpoint registry.
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 20-Apr-2007
- */
-public class EndpointRegistryImpl implements EndpointRegistry
-{
- // provide logging
- private static final Logger log = Logger.getLogger(EndpointRegistryImpl.class);
-
- private Map<ObjectName, Endpoint> endpoints = new HashMap<ObjectName,
Endpoint>();
-
- public Endpoint getEndpoint(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " +
epName);
-
- Endpoint endpoint = endpoints.get(epName);
- return endpoint;
- }
-
- public boolean isRegistered(ObjectName epName)
- {
- if (epName == null)
- throw new IllegalArgumentException("Endpoint name cannot be null");
-
- return endpoints.get(epName) != null;
- }
-
- public Set<ObjectName> getEndpoints()
- {
- return endpoints.keySet();
- }
-
- public void register(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (epName == null)
- throw new IllegalStateException("Endpoint name cannot be null for: " +
endpoint);
-
- if (isRegistered(epName))
- throw new IllegalStateException("Endpoint already registered: " +
epName);
-
- log.info("register: " + epName);
- endpoints.put(epName, endpoint);
- }
-
- public void unregister(Endpoint endpoint)
- {
- if (endpoint == null)
- throw new IllegalArgumentException("Endpoint cannot be null");
-
- ObjectName epName = endpoint.getName();
- if (isRegistered(epName) == false)
- throw new IllegalStateException("Endpoint not registered: " +
epName);
-
- log.info("remove: " + epName);
- endpoints.remove(epName);
- }
-}
Modified:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfig.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -24,6 +24,7 @@
// $Id$
import java.io.File;
+import java.net.UnknownHostException;
/**
* Interface to container independent config
@@ -45,9 +46,17 @@
String getWebServiceHost();
+ void setWebServiceHost(String host) throws UnknownHostException;
+
int getWebServicePort();
+ void setWebServicePort(int port);
+
int getWebServiceSecurePort();
+ void setWebServiceSecurePort(int port);
+
boolean isModifySOAPAddress();
+
+ void setModifySOAPAddress(boolean flag);
}
Deleted:
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java
===================================================================
---
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbossws-spi/trunk/src/main/java/org/jboss/ws/integration/management/ServerConfigImpl.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -1,218 +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.management;
-
-//$Id$
-
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Iterator;
-import java.util.Set;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.JMException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.ObjectName;
-
-import org.jboss.logging.Logger;
-import org.jboss.ws.integration.ObjectNameFactory;
-
-/**
- * JBoss specific implementation of a ServerConfig
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author darran.lofthouse(a)jboss.com
- * @since 08-May-2006
- */
-public class ServerConfigImpl implements ServerConfig
-{
- private static final Logger log = Logger.getLogger(ServerConfigImpl.class);
-
- // The webservice host name that will be used when updating the wsdl
- private String webServiceHost = UNDEFINED_HOSTNAME;
- // The webservice port that will be used when updating the wsdl
- private int webServicePort;
- // The webservice port that will be used when updating the wsdl
- private int webServiceSecurePort;
- // Whether we should always modify the soap address to the deployed endpoing location
- private boolean modifySOAPAddress;
- // The MBeanServer
- private MBeanServer server;
-
- public String getWebServiceHost()
- {
- return webServiceHost;
- }
-
- public void setWebServiceHost(String host) throws UnknownHostException
- {
- if (host == null || host.trim().length() == 0)
- {
- log.debug("Using undefined host: " + UNDEFINED_HOSTNAME);
- host = UNDEFINED_HOSTNAME;
- }
- if ("0.0.0.0".equals(host))
- {
- InetAddress localHost = InetAddress.getLocalHost();
- log.debug("Using local host: " + localHost.getHostName());
- host = localHost.getHostName();
- }
- this.webServiceHost = host;
- }
-
- public void setWebServicePort(int port)
- {
- this.webServicePort = port;
- }
-
- public void setWebServiceSecurePort(int port)
- {
- this.webServiceSecurePort = port;
- }
-
- public boolean isModifySOAPAddress()
- {
- return modifySOAPAddress;
- }
-
- public void setModifySOAPAddress(boolean modify)
- {
- this.modifySOAPAddress = modify;
- }
-
- public File getServerTempDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerTempDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public File getServerDataDir()
- {
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName oname =
ObjectNameFactory.create("jboss.system:type=ServerConfig");
- File tmpdir = (File)server.getAttribute(oname, "ServerDataDir");
- return tmpdir;
- }
- catch (JMException e)
- {
- return null;
- }
- }
-
- public int getWebServicePort()
- {
- if (webServicePort <= 0)
- webServicePort = getConnectorPort("HTTP/1.1", false);
-
- if (webServicePort <= 0)
- {
- log.warn("Unable to calculate 'WebServicePort', using default
'8080'");
- webServicePort = 8080;
- }
-
- return webServicePort;
- }
-
- public int getWebServiceSecurePort()
- {
- if (webServiceSecurePort <= 0)
- webServiceSecurePort = getConnectorPort("HTTP/1.1", true);
-
- if (webServiceSecurePort <= 0)
- {
- log.warn("Unable to calculate 'WebServiceSecurePort', using default
'8443'");
- webServiceSecurePort = 8443;
- }
-
- return webServiceSecurePort;
- }
-
- private int getConnectorPort(final String protocol, final boolean secure)
- {
- int port = -1;
-
- try
- {
- MBeanServer server = getMBeanServer();
- ObjectName connectors = new ObjectName("jboss.web:type=Connector,*");
-
- Set connectorNames = server.queryNames(connectors, null);
- for (Object current : connectorNames)
- {
- ObjectName currentName = (ObjectName)current;
-
- try
- {
- int connectorPort = (Integer)server.getAttribute(currentName,
"port");
- boolean connectorSecure = (Boolean)server.getAttribute(currentName,
"secure");
- String connectorProtocol = (String)server.getAttribute(currentName,
"protocol");
-
- if (protocol.equals(connectorProtocol) && secure ==
connectorSecure)
- {
- if (port > -1)
- {
- log.warn("Found multiple connectors for protocol='" +
protocol + "' and secure='" + secure + "', using first port
found '" + port + "'");
- }
- else
- {
- port = connectorPort;
- }
- }
- }
- catch (AttributeNotFoundException ignored)
- {
- }
- }
-
- return port;
- }
- catch (JMException e)
- {
- return -1;
- }
- }
-
- private MBeanServer getMBeanServer()
- {
- if (server == null)
- {
- for (Iterator i = MBeanServerFactory.findMBeanServer(null).iterator();
i.hasNext();)
- {
- server = (MBeanServer)i.next();
- }
- }
- return server;
- }
-}
Modified:
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java
===================================================================
---
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookEJB21.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -27,11 +27,11 @@
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.BeanMetaData;
import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
@@ -55,7 +55,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.ucl);
@@ -92,7 +92,7 @@
Class<?> epBean = loader.loadClass(ejbClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
---
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXRPCDeployerHookJSE.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -30,11 +30,11 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
@@ -61,7 +61,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.annotationsCl);
@@ -96,7 +96,7 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
---
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookEJB3.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -31,11 +31,11 @@
import org.jboss.ejb3.Ejb3ModuleMBean;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
/**
@@ -56,7 +56,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.ucl);
@@ -74,7 +74,7 @@
Class epBean = container.getBeanClass();
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java
===================================================================
---
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss42/trunk/src/main/java/org/jboss/ws/integration/jboss42/jbossws/JAXWSDeployerHookJSE.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -36,13 +36,13 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.ResourceLoaderAdapter;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.UnifiedVirtualFile;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
/**
@@ -63,7 +63,7 @@
@Override
public Deployment createDeployment(DeploymentInfo unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.annotationsCl);
@@ -88,7 +88,7 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml
===================================================================
---
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss42/trunk/src/main/resources/jbossws.beans/META-INF/jboss-beans.xml 2007-05-09
12:40:45 UTC (rev 3016)
@@ -3,7 +3,7 @@
<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
xmlns="urn:jboss:bean-deployer">
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig"
class="org.jboss.ws.integration.management.ServerConfigImpl">
+ <bean name="WSServerConfig"
class="org.jboss.ws.core.server.ManagedServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
@@ -26,7 +26,7 @@
</bean>
<!-- The registry for web service endpoints -->
- <bean name="WSEndpointRegistry"
class="org.jboss.ws.core.server.ServiceEndpointRegistry"/>
+ <bean name="WSEndpointRegistry"
class="org.jboss.ws.core.server.ManagedEndpointRegistry"/>
<!-- A subscription manager for WS-Eventing -->
<bean name="WSSubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
@@ -76,7 +76,7 @@
Each DeploymentManger maintains a list of Deployers
Each Deployer handles a single aspect of web service deployment.
-->
- <bean name="WSDeployerManagerJSE"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSDeployerManagerJSE"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
@@ -86,7 +86,7 @@
</list>
</property>
</bean>
- <bean name="WSDeployerManagerEJB"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSDeployerManagerEJB"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
@@ -97,7 +97,7 @@
</list>
</property>
</bean>
- <bean name="WSMainDeployerManager"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSMainDeployerManager"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSEndpointNameDeployer"/>
Modified:
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java
===================================================================
---
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookEJB21.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -27,11 +27,11 @@
import org.jboss.metadata.ApplicationMetaData;
import org.jboss.metadata.BeanMetaData;
import org.jboss.ws.integration.Endpoint;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
import org.jboss.ws.integration.deployment.Deployment;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
import org.jboss.ws.metadata.webservices.WebserviceDescriptionMetaData;
@@ -55,7 +55,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -92,7 +92,7 @@
Class<?> epBean = loader.loadClass(ejbClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbLink;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java
===================================================================
---
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXRPCDeployerHookJSE.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -26,11 +26,11 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
import org.jboss.ws.metadata.webservices.PortComponentMetaData;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -93,7 +93,7 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletLink;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java
===================================================================
---
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookEJB3.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -32,11 +32,11 @@
import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -81,7 +81,7 @@
Class epBean = container.getBeanClass();
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + ejbName;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java
===================================================================
---
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss50/trunk/src/main/java/org/jboss/ws/integration/jboss50/jbossws/JAXWSDeployerHookJSE.java 2007-05-09
12:40:45 UTC (rev 3016)
@@ -32,11 +32,11 @@
import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.metadata.WebMetaData;
import org.jboss.metadata.web.Servlet;
-import org.jboss.ws.integration.EndpointImpl;
+import org.jboss.ws.integration.BasicEndpoint;
import org.jboss.ws.integration.Endpoint;
import org.jboss.ws.integration.ObjectNameFactory;
import org.jboss.ws.integration.Service;
-import org.jboss.ws.integration.deployment.DeploymentImpl;
+import org.jboss.ws.integration.deployment.BasicDeploymentImpl;
import org.jboss.ws.integration.deployment.Deployment;
import org.jboss.ws.integration.deployment.Deployment.DeploymentType;
@@ -58,7 +58,7 @@
@Override
public Deployment createDeployment(DeploymentUnit unit)
{
- Deployment dep = new DeploymentImpl();
+ Deployment dep = new BasicDeploymentImpl();
dep.setType(getDeploymentType());
dep.setClassLoader(unit.getClassLoader());
@@ -83,7 +83,7 @@
Class<?> epBean = loader.loadClass(servletClass.trim());
// Create the endpoint
- Endpoint endpoint = new EndpointImpl(service, epBean);
+ Endpoint endpoint = new BasicEndpoint(service, epBean);
String nameStr = Endpoint.SEPID_DOMAIN + ":" +
Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName;
endpoint.setName(ObjectNameFactory.create(nameStr));
Modified:
projects/wsintegration/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml
===================================================================
---
projects/wsintegration/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-09
12:40:01 UTC (rev 3015)
+++
projects/wsintegration/jbws-jboss50/trunk/src/main/resources/jbossws.sar/META-INF/jbossws-beans.xml 2007-05-09
12:40:45 UTC (rev 3016)
@@ -3,7 +3,7 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<!-- An abstraction of server configuration aspects. -->
- <bean name="WSServerConfig"
class="org.jboss.ws.integration.management.ServerConfigImpl">
+ <bean name="WSServerConfig"
class="org.jboss.ws.core.server.ManagedServerConfig">
<!--
The WSDL, that is a required deployment artifact for an endpoint, has a
<soap:address>
element which points to the location of the endpoint. JBoss supports rewriting of
that SOAP address.
@@ -26,7 +26,7 @@
</bean>
<!-- The registry for web service endpoints -->
- <bean name="WSEndpointRegistry"
class="org.jboss.ws.core.server.ServiceEndpointRegistry"/>
+ <bean name="WSEndpointRegistry"
class="org.jboss.ws.core.server.ManagedEndpointRegistry"/>
<!-- A subscription manager for WS-Eventing -->
<bean name="WSSubscriptionManager"
class="org.jboss.ws.extensions.eventing.mgmt.SubscriptionManager"/>
@@ -88,7 +88,7 @@
Each DeploymentManger maintains a list of Deployers
Each Deployer handles a single aspect of web service deployment.
-->
- <bean name="WSDeployerManagerJSE"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSDeployerManagerJSE"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
@@ -98,7 +98,7 @@
</list>
</property>
</bean>
- <bean name="WSDeployerManagerEJB"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSDeployerManagerEJB"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSUnifiedDeploymentInfoDeployer"/>
@@ -109,7 +109,7 @@
</list>
</property>
</bean>
- <bean name="WSMainDeployerManager"
class="org.jboss.ws.integration.deployment.DeployerManagerImpl">
+ <bean name="WSMainDeployerManager"
class="org.jboss.ws.integration.deployment.BasicDeployerManager">
<property name="deployers">
<list class="java.util.LinkedList"
elementClass="org.jboss.ws.integration.deployment.Deployer">
<inject bean="WSEndpointNameDeployer"/>