Author: alessio.soldano(a)jboss.com
Date: 2009-05-25 07:11:17 -0400 (Mon, 25 May 2009)
New Revision: 10093
Added:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
Log:
[JBWS-2652] Providing ServerConfig implementation for AS 5.0.0.GA
Added:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
===================================================================
---
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
(rev 0)
+++
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java 2009-05-25
11:11:17 UTC (rev 10093)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50.deployer;
+
+import java.io.File;
+
+import javax.management.JMException;
+import javax.management.ObjectName;
+
+import org.jboss.wsf.common.management.AbstractServerConfig;
+import org.jboss.wsf.common.management.AbstractServerConfigMBean;
+
+/**
+ * A ServerConfig for AS <= 5.1.0
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @author Thomas.Diesler(a)jboss.org
+ *
+ */
+public class ServerConfigImpl extends AbstractServerConfig implements
AbstractServerConfigMBean
+{
+
+ public File getServerTempDir()
+ {
+ return this.getDirFromServerConfig("ServerTempDir");
+ }
+
+ public File getHomeDir()
+ {
+ return this.getDirFromServerConfig("HomeDir");
+ }
+
+ public File getServerDataDir()
+ {
+ return this.getDirFromServerConfig("ServerDataDir");
+ }
+
+ /**
+ * Obtains the specified attribute from the server configuration,
+ * represented as a {@link File}.
+ *
+ * @param attributeName
+ * @return
+ * @author ALR
+ */
+ protected File getDirFromServerConfig(final String attributeName)
+ {
+ // Define the ON to invoke upon
+ final ObjectName on = OBJECT_NAME_SERVER_CONFIG;
+
+ // Get the URL location
+ File location = null;
+ try
+ {
+ location = (File) getMbeanServer().getAttribute(on, attributeName);
+ }
+ catch (final JMException e)
+ {
+ throw new RuntimeException("Could not obtain attribute " +
attributeName + " from " + on, e);
+ }
+ return location;
+ }
+}
Property changes on:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
===================================================================
---
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2009-05-25
11:10:47 UTC (rev 10092)
+++
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml 2009-05-25
11:11:17 UTC (rev 10093)
@@ -15,6 +15,31 @@
<!-- The HTTPServer used by the JAXWS Endpoint API -->
<bean name="WSHTTPServer"
class="org.jboss.wsf.container.jboss50.transport.DeploymentAspectHttpServer"/>
+ <!-- An abstraction of server configuration aspects. -->
+ <bean name="WSServerConfig"
class="org.jboss.wsf.container.jboss50.deployer.ServerConfigImpl">
+ <property name="mbeanServer"><inject
bean="WSMBeanServerLocator"
property="mbeanServer"/></property>
+
+ <!--
+ 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.
+
+ If the content of <soap:address> is a valid URL, JBossWS will not rewrite it
unless 'modifySOAPAddress' is true.
+ If the content of <soap:address> is not a valid URL, JBossWS will rewrite it
using the attribute values given below.
+
+ If 'webServiceHost' is not set, JBossWS uses requesters protocol host when
rewriting the <soap:address>.
+ -->
+ <property
name="webServiceHost">${jboss.bind.address}</property>
+ <property name="modifySOAPAddress">true</property>
+
+ <!--
+ Set these properties to explicitly define the ports that will be used for rewriting
the SOAP address.
+ Otherwise the ports will be identified by querying the list of installed
connectors.
+ If multiple connectors are found the port of the first connector is used.
+ <property name="webServiceSecurePort">8443</property>
+ <property name="webServicePort">8080</property>
+ -->
+ </bean>
+
<!--
*********************************************************************************************************************
Web Service deployment