[jboss-cvs] JBossAS SVN: r89367 - in branches/Branch_5_x: webservices/src/main/org/jboss/wsf/container/jboss50/deployer and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon May 25 08:05:32 EDT 2009


Author: alessio.soldano at jboss.com
Date: 2009-05-25 08:05:32 -0400 (Mon, 25 May 2009)
New Revision: 89367

Added:
   branches/Branch_5_x/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
Modified:
   branches/Branch_5_x/component-matrix/pom.xml
   branches/Branch_5_x/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
Log:
[JBWS-2652] Providing container specific ServerConfig implementation + moving to JBossWS 3.2.0.Beta1


Modified: branches/Branch_5_x/component-matrix/pom.xml
===================================================================
--- branches/Branch_5_x/component-matrix/pom.xml	2009-05-25 12:04:57 UTC (rev 89366)
+++ branches/Branch_5_x/component-matrix/pom.xml	2009-05-25 12:05:32 UTC (rev 89367)
@@ -35,10 +35,10 @@
     <version.javax.faces>1.2_12</version.javax.faces>
     <version.jboss.jaxr>1.2.1.GA</version.jboss.jaxr>
     <version.jboss.jbossts>4.6.1.GA</version.jboss.jbossts>
-    <version.jboss.jbossws-common>1.1.1.Alpha1</version.jboss.jbossws-common>
-    <version.jboss.jbossws-framework>3.1.2.SP1</version.jboss.jbossws-framework>
-    <version.jboss.jbossws-spi>1.1.2.GA</version.jboss.jbossws-spi>
-    <version.jboss.jbossws>3.1.2.GA</version.jboss.jbossws>
+    <version.jboss.jbossws-common>1.2.0.Beta1</version.jboss.jbossws-common>
+    <version.jboss.jbossws-framework>3.2.0.Beta1</version.jboss.jbossws-framework>
+    <version.jboss.jbossws-spi>1.2.0.Beta1</version.jboss.jbossws-spi>
+    <version.jboss.jbossws>3.2.0.Beta1</version.jboss.jbossws>
     <version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
     <version.jboss.messaging>1.4.3.GA</version.jboss.messaging>
     <version.jboss.web>2.1.3.GA</version.jboss.web>

Added: branches/Branch_5_x/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
===================================================================
--- branches/Branch_5_x/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java	                        (rev 0)
+++ branches/Branch_5_x/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java	2009-05-25 12:05:32 UTC (rev 89367)
@@ -0,0 +1,97 @@
+/*
+ * 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 java.net.URISyntaxException;
+import java.net.URL;
+
+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 (5.1.0 excluded)
+ * 
+ * @author alessio.soldano at jboss.com
+ * @author ALR
+ *
+ */
+public class ServerConfigImpl extends AbstractServerConfig implements AbstractServerConfigMBean
+{
+
+   public File getServerTempDir()
+   {
+      return this.getDirFromServerConfig("ServerTempLocation");
+   }
+   
+   public File getHomeDir()
+   {
+      return this.getDirFromServerConfig("JBossHome");
+   }
+
+   public File getServerDataDir()
+   {
+      return this.getDirFromServerConfig("ServerDataLocation");
+   }
+   
+   /**
+    * 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
+      URL location = null;
+      try
+      {
+         location = (URL) getMbeanServer().getAttribute(on, attributeName);
+      }
+      catch (final JMException e)
+      {
+         throw new RuntimeException("Could not obtain attribute " + attributeName + " from " + on, e);
+      }
+
+      // Represent as a File
+      File dir = null;
+      try
+      {
+         dir = new File(location.toURI());
+      }
+      catch (final URISyntaxException urise)
+      {
+         throw new RuntimeException("Could not desired directory from URL: " + location, urise);
+      }
+
+      // Return
+      return dir;
+   }
+}


Property changes on: branches/Branch_5_x/webservices/src/main/org/jboss/wsf/container/jboss50/deployer/ServerConfigImpl.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: branches/Branch_5_x/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml
===================================================================
--- branches/Branch_5_x/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml	2009-05-25 12:04:57 UTC (rev 89366)
+++ branches/Branch_5_x/webservices/src/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-jboss-beans.xml	2009-05-25 12:05:32 UTC (rev 89367)
@@ -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                                                                                                
   




More information about the jboss-cvs-commits mailing list