Author: thomas.diesler(a)jboss.com
Date: 2007-08-09 07:05:03 -0400 (Thu, 09 Aug 2007)
New Revision: 4284
Added:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java
Removed:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java
Modified:
framework/trunk/ant-import/build-thirdparty.xml
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
framework/trunk/src/test/ant-import/build-testsuite.xml
Log:
Rename to DefaultLifecycleHandler
Get impl version from ServerConfig
Modified: framework/trunk/ant-import/build-thirdparty.xml
===================================================================
--- framework/trunk/ant-import/build-thirdparty.xml 2007-08-09 10:04:14 UTC (rev 4283)
+++ framework/trunk/ant-import/build-thirdparty.xml 2007-08-09 11:05:03 UTC (rev 4284)
@@ -36,13 +36,16 @@
<target name="thirdparty-get" depends="thirdparty-init"
if="force.thirdparty" description="Gets the thirdparty libraries">
<mkdir dir="${thirdparty.dir}"/>
+ <get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar"
dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common-src.zip"
dest="${thirdparty.dir}/jbossws-common-src.zip" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar"
dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true"
verbose="true"/>
+ <get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi-src.zip"
dest="${thirdparty.dir}/jbossws-spi-src.zip" usetimestamp="true"
verbose="true"/>
+
<get src="${jboss.repository}/dom4j/${dom4j}/lib/dom4j.jar"
dest="${thirdparty.dir}/dom4j.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core.jar"
dest="${thirdparty.dir}/jboss-common-core.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/common-core/${jboss-common-core}/lib/jboss-common-core-sources.jar"
dest="${thirdparty.dir}/jboss-common-core-sources.jar"
usetimestamp="true" verbose="true"/>
<get
src="${jboss.repository}/jboss/common-logging-spi/${jboss-common-logging-spi}/lib/jboss-logging-spi.jar"
dest="${thirdparty.dir}/jboss-logging-spi.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jboss-javaee/${jboss-javaee}/lib/jboss-javaee.jar"
dest="${thirdparty.dir}/jboss-javaee.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossws-common/${jbossws-common}/lib/jbossws-common.jar"
dest="${thirdparty.dir}/jbossws-common.jar" usetimestamp="true"
verbose="true"/>
- <get
src="${jboss.repository}/jboss/jbossws-spi/${jbossws-spi}/lib/jbossws-spi.jar"
dest="${thirdparty.dir}/jbossws-spi.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding.jar"
dest="${thirdparty.dir}/jboss-xml-binding.jar" usetimestamp="true"
verbose="true"/>
<get
src="${jboss.repository}/jboss/jbossxb/${jboss-jbossxb}/lib/jboss-xml-binding-sources.jar"
dest="${thirdparty.dir}/jboss-xml-binding-sources.jar"
usetimestamp="true" verbose="true"/>
<get
src="${jboss.repository}/sun-jaxrpc/${sun-jaxrpc}/lib/jaxrpc-api.jar"
dest="${thirdparty.dir}/jaxrpc-api.jar" usetimestamp="true"
verbose="true"/>
Copied:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java
(from rev 4274,
framework/branches/framework-2.0/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java)
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java
(rev 0)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandler.java 2007-08-09
11:05:03 UTC (rev 4284)
@@ -0,0 +1,98 @@
+/*
+ * 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.wsf.framework.deployment;
+
+//$Id$
+
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
+import org.jboss.wsf.spi.deployment.LifecycleHandler;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.invocation.InvocationHandler;
+
+/**
+ * A basic lifecycle handler
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 31-Oct-2006
+ */
+public class DefaultLifecycleHandler implements LifecycleHandler
+{
+ // provide logging
+ protected final Logger log = Logger.getLogger(getClass());
+
+ public void create(Endpoint ep)
+ {
+ log.debug("Create: " + ep.getName());
+
+ InvocationHandler invHandler = ep.getInvocationHandler();
+ if (invHandler == null)
+ throw new IllegalStateException("Invocation handler not available");
+
+ invHandler.init(ep);
+
+ ep.setState(EndpointState.CREATED);
+ }
+
+ public void start(Endpoint ep)
+ {
+ log.debug("Start: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
+ {
+ log.error("Cannot start endpoint in state: " + state);
+ }
+ else
+ {
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().start();
+
+ ep.setState(EndpointState.STARTED);
+ }
+ }
+
+ public void stop(Endpoint ep)
+ {
+ log.debug("Stop: " + ep.getName());
+
+ EndpointState state = ep.getState();
+ if (state != EndpointState.STARTED)
+ {
+ log.error("Cannot stop endpoint in state: " + state);
+ }
+ else
+ {
+ if (ep.getEndpointMetrics() != null)
+ ep.getEndpointMetrics().stop();
+
+ ep.setState(EndpointState.STOPPED);
+ }
+ }
+
+ public void destroy(Endpoint ep)
+ {
+ log.debug("Destroy: " + ep.getName());
+
+ ep.setState(EndpointState.DESTROYED);
+ }
+}
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java 2007-08-09
10:04:14 UTC (rev 4283)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/DefaultLifecycleHandlerFactory.java 2007-08-09
11:05:03 UTC (rev 4284)
@@ -32,6 +32,6 @@
{
public LifecycleHandler newLifecylceHandler()
{
- return new LifecycleHandlerImpl();
+ return new DefaultLifecycleHandler();
}
}
Deleted:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java 2007-08-09
10:04:14 UTC (rev 4283)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/LifecycleHandlerImpl.java 2007-08-09
11:05:03 UTC (rev 4284)
@@ -1,90 +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.wsf.framework.deployment;
-
-//$Id$
-
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Endpoint.EndpointState;
-import org.jboss.wsf.spi.deployment.LifecycleHandler;
-import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.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 ep)
- {
- log.debug("Create: " + ep.getName());
-
- InvocationHandler invHandler = ep.getInvocationHandler();
- if (invHandler == null)
- throw new IllegalStateException("Invocation handler not available");
-
- invHandler.init(ep);
-
- ep.setState(EndpointState.CREATED);
- }
-
- public void start(Endpoint ep)
- {
- log.debug("Start: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state == EndpointState.UNDEFINED || state == EndpointState.DESTROYED)
- throw new IllegalStateException("Cannot start endpoint in state: " +
state);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().start();
-
- ep.setState(EndpointState.STARTED);
- }
-
- public void stop(Endpoint ep)
- {
- log.debug("Stop: " + ep.getName());
-
- EndpointState state = ep.getState();
- if (state != EndpointState.STARTED)
- throw new IllegalStateException("Cannot stop endpoint in state: " +
state);
-
- if (ep.getEndpointMetrics() != null)
- ep.getEndpointMetrics().stop();
-
- ep.setState(EndpointState.STOPPED);
- }
-
- public void destroy(Endpoint ep)
- {
- log.debug("Destroy: " + ep.getName());
-
- ep.setState(EndpointState.DESTROYED);
- }
-}
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2007-08-09
10:04:14 UTC (rev 4283)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/management/ContextServlet.java 2007-08-09
11:05:03 UTC (rev 4284)
@@ -40,6 +40,8 @@
import org.jboss.wsf.spi.management.EndpointMetrics;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
@@ -171,10 +173,11 @@
private void setupHTMLResponseHeader(PrintWriter writer)
{
- Package wsPackage = Package.getPackage("org.jboss.ws");
+ SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ ServerConfig serverConfig =
spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
writer.println("<head>");
writer.println("<meta http-equiv='Content-Type content='text/html;
charset=iso-8859-1'>");
- writer.println("<title>JBossWS / " +
wsPackage.getImplementationVersion() + "</title>");
+ writer.println("<title>JBossWS / " +
serverConfig.getImplementationVersion() + "</title>");
writer.println("<link rel='stylesheet'
href='./styles.css'>");
writer.println("</head>");
}
Modified: framework/trunk/src/test/ant-import/build-testsuite.xml
===================================================================
--- framework/trunk/src/test/ant-import/build-testsuite.xml 2007-08-09 10:04:14 UTC (rev
4283)
+++ framework/trunk/src/test/ant-import/build-testsuite.xml 2007-08-09 11:05:03 UTC (rev
4284)
@@ -83,9 +83,10 @@
<echo/>
<echo message="-----------------------------------------------"/>
- <echo message="jboss.home = ${jboss.home}"/>
- <echo message="jboss.bind = ${jboss.bind.address}"/>
- <echo message="java.home = ${java.home}"/>
+ <echo message="jboss.home = ${jboss.home}"/>
+ <echo message="excludesfile = ${excludesfile}"/>
+ <echo message="java.home = ${java.home}"/>
+ <echo message="jboss.bind = ${jboss.bind.address}"/>
<echo message="-----------------------------------------------"/>
<tstamp>
@@ -268,7 +269,6 @@
<attribute name="srcdir"/>
<sequential>
<mkdir dir="${tests.output.dir}/classes"/>
- <echo message="excludesfile = @{excludesfile}"/>
<javac destdir="${tests.output.dir}/classes"
debug="${javac.debug}" encoding="utf-8"
verbose="${javac.verbose}" deprecation="${javac.deprecation}"
failonerror="${javac.fail.onerror}"
excludesfile="@{excludesfile}">
<src path="@{srcdir}"/>