Author: thomas.diesler(a)jboss.com
Date: 2007-05-23 00:03:24 -0400 (Wed, 23 May 2007)
New Revision: 3198
Added:
trunk/integration/jboss42/ant-import/build-release.xml
trunk/integration/jboss42/src/main/etc/
trunk/integration/jboss42/src/main/etc/component-info.xml
trunk/integration/jboss50/ant-import/build-release.xml
trunk/integration/jboss50/src/main/etc/
trunk/integration/jboss50/src/main/etc/component-info.xml
trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
Removed:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/FactoryLoader.java
Modified:
trunk/build/ant-import/build-release.xml
trunk/integration/jboss42/build.xml
trunk/integration/jboss50/build.xml
trunk/integration/jbws/ant-import/build-release.xml
trunk/integration/jbws/src/main/etc/component-info-jbws42.xml
trunk/integration/jbws/src/main/etc/component-info-jbws50.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
Log:
Fix AS dependency on FactoryLoader
Modified: trunk/build/ant-import/build-release.xml
===================================================================
--- trunk/build/ant-import/build-release.xml 2007-05-22 20:32:33 UTC (rev 3197)
+++ trunk/build/ant-import/build-release.xml 2007-05-23 04:03:24 UTC (rev 3198)
@@ -41,6 +41,8 @@
<target name="release-to-repository" depends="prepare"
description="Release to local repository">
<ant antfile="${spi.dir}/build.xml" target="release"
inheritall="false"/>
<ant antfile="${core.dir}/build.xml" target="release"
inheritall="false"/>
+ <ant antfile="${int.jboss42.dir}/build.xml" target="release"
inheritall="false"/>
+ <ant antfile="${int.jboss50.dir}/build.xml" target="release"
inheritall="false"/>
<ant antfile="${int.jbws.dir}/build.xml" target="release"
inheritall="false"/>
</target>
Added: trunk/integration/jboss42/ant-import/build-release.xml
===================================================================
--- trunk/integration/jboss42/ant-import/build-release.xml (rev
0)
+++ trunk/integration/jboss42/ant-import/build-release.xml 2007-05-23 04:03:24 UTC (rev
3198)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <!-- Release to jboss.local.repository -->
+ <target name="release" depends="jars"
+ description="Release to jboss.local.repository">
+
+ <!-- jboss/jbossws-jboss42 -->
+ <property name="jboss.repository.dir"
value="${jboss.local.repository}/jboss"/>
+ <mkdir
dir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"/>
+ <copy
todir="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/lib"
overwrite="true">
+ <fileset dir="${int.jboss42.dir}/output/lib">
+ <include name="jbossws-jboss42.jar"/>
+ <include name="jbossws-jboss42-src.zip"/>
+ </fileset>
+ </copy>
+ <copy
tofile="${jboss.repository.dir}/jbossws-jboss42/${repository.id}/component-info.xml"
file="${jbws42.etc.dir}/component-info.xml" filtering="true"
overwrite="true">
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+
+ </target>
+
+</project>
Property changes on: trunk/integration/jboss42/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss42/build.xml
===================================================================
--- trunk/integration/jboss42/build.xml 2007-05-22 20:32:33 UTC (rev 3197)
+++ trunk/integration/jboss42/build.xml 2007-05-23 04:03:24 UTC (rev 3198)
@@ -15,6 +15,7 @@
<import file="${basedir}/build/ant-import/build-setup.xml"/>
+ <import file="${int.jboss42.dir}/ant-import/build-release.xml"/>
<import file="${int.jboss42.dir}/ant-import/build-thirdparty.xml"/>
<!-- ================================================================== -->
Added: trunk/integration/jboss42/src/main/etc/component-info.xml
===================================================================
--- trunk/integration/jboss42/src/main/etc/component-info.xml (rev
0)
+++ trunk/integration/jboss42/src/main/etc/component-info.xml 2007-05-23 04:03:24 UTC (rev
3198)
@@ -0,0 +1,21 @@
+<project name="jboss/jbossws-jboss42">
+
+ <component id="jboss/jbossws-jboss42"
+ description="JBossWS container integration layer"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-jboss42.jar"/>
+ <artifact id="jbossws-jboss42-src.zip"/>
+
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@repository.id(a)"/>
+ </import>
+
+ <export>
+ <include input="jbossws-jboss42.jar"/>
+ </export>
+
+ </component>
+
+</project>
Property changes on: trunk/integration/jboss42/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: trunk/integration/jboss50/ant-import/build-release.xml
===================================================================
--- trunk/integration/jboss50/ant-import/build-release.xml (rev
0)
+++ trunk/integration/jboss50/ant-import/build-release.xml 2007-05-23 04:03:24 UTC (rev
3198)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ====================================================================== -->
+<!-- -->
+<!-- JBoss, the OpenSource J2EE webOS -->
+<!-- -->
+<!-- Distributable under LGPL license. -->
+<!-- See terms of license at
http://www.gnu.org. -->
+<!-- -->
+<!-- ====================================================================== -->
+
+<!-- $Id$ -->
+
+<project>
+
+ <!-- Release to jboss.local.repository -->
+ <target name="release" depends="jars"
+ description="Release to jboss.local.repository">
+
+ <!-- jboss/jbossws-jboss50 -->
+ <property name="jboss.repository.dir"
value="${jboss.local.repository}/jboss"/>
+ <mkdir
dir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"/>
+ <copy
todir="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/lib"
overwrite="true">
+ <fileset dir="${int.jboss50.dir}/output/lib">
+ <include name="jbossws-jboss50.jar"/>
+ <include name="jbossws-jboss50-src.zip"/>
+ </fileset>
+ </copy>
+ <copy
tofile="${jboss.repository.dir}/jbossws-jboss50/${repository.id}/component-info.xml"
file="${jbws50.etc.dir}/component-info.xml" filtering="true"
overwrite="true">
+ <filterset>
+ <filtersfile file="${build.dir}/version.properties"/>
+ </filterset>
+ </copy>
+
+ </target>
+
+</project>
Property changes on: trunk/integration/jboss50/ant-import/build-release.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jboss50/build.xml
===================================================================
--- trunk/integration/jboss50/build.xml 2007-05-22 20:32:33 UTC (rev 3197)
+++ trunk/integration/jboss50/build.xml 2007-05-23 04:03:24 UTC (rev 3198)
@@ -15,6 +15,7 @@
<import file="${basedir}/build/ant-import/build-setup.xml"/>
+ <import file="${int.jboss50.dir}/ant-import/build-release.xml"/>
<import file="${int.jboss50.dir}/ant-import/build-thirdparty.xml"/>
<!-- ================================================================== -->
Added: trunk/integration/jboss50/src/main/etc/component-info.xml
===================================================================
--- trunk/integration/jboss50/src/main/etc/component-info.xml (rev
0)
+++ trunk/integration/jboss50/src/main/etc/component-info.xml 2007-05-23 04:03:24 UTC (rev
3198)
@@ -0,0 +1,21 @@
+<project name="jboss/jbossws-jboss50">
+
+ <component id="jboss/jbossws-jboss50"
+ description="JBossWS container integration layer"
+ version="@repository.id(a)"
+ licenseType="lgpl">
+
+ <artifact id="jbossws-jboss50.jar"/>
+ <artifact id="jbossws-jboss50-src.zip"/>
+
+ <import componentref="jboss/jbossws-spi">
+ <compatible version="@repository.id(a)"/>
+ </import>
+
+ <export>
+ <include input="jbossws-jboss50.jar"/>
+ </export>
+
+ </component>
+
+</project>
Property changes on: trunk/integration/jboss50/src/main/etc/component-info.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/integration/jbws/ant-import/build-release.xml
===================================================================
--- trunk/integration/jbws/ant-import/build-release.xml 2007-05-22 20:32:33 UTC (rev
3197)
+++ trunk/integration/jbws/ant-import/build-release.xml 2007-05-23 04:03:24 UTC (rev
3198)
@@ -21,10 +21,6 @@
<property name="jboss.repository.dir"
value="${jboss.local.repository}/jboss"/>
<mkdir
dir="${jboss.repository.dir}/jbossws-jbws50/${repository.id}/lib"/>
<copy
todir="${jboss.repository.dir}/jbossws-jbws50/${repository.id}/lib"
overwrite="true">
- <fileset dir="${int.jboss50.dir}/output/lib">
- <include name="jbossws-jboss50.jar"/>
- <include name="jbossws-jboss50-src.zip"/>
- </fileset>
<fileset dir="${int.jbws.dir}/output/lib">
<include name="jbossws-jbws50.sar"/>
<include name="jbossws-jbws50-deployer.zip"/>
@@ -40,10 +36,6 @@
<property name="jboss.repository.dir"
value="${jboss.local.repository}/jboss"/>
<mkdir
dir="${jboss.repository.dir}/jbossws-jbws42/${repository.id}/lib"/>
<copy
todir="${jboss.repository.dir}/jbossws-jbws42/${repository.id}/lib"
overwrite="true">
- <fileset dir="${int.jboss42.dir}/output/lib">
- <include name="jbossws-jboss42.jar"/>
- <include name="jbossws-jboss42-src.zip"/>
- </fileset>
<fileset dir="${int.jbws.dir}/output/lib">
<include name="jbossws-jbws42.sar"/>
</fileset>
Modified: trunk/integration/jbws/src/main/etc/component-info-jbws42.xml
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jbws42.xml 2007-05-22 20:32:33 UTC
(rev 3197)
+++ trunk/integration/jbws/src/main/etc/component-info-jbws42.xml 2007-05-23 04:03:24 UTC
(rev 3198)
@@ -5,8 +5,6 @@
version="@repository.id(a)"
licenseType="lgpl">
- <artifact id="jbossws-jboss42.jar"/>
- <artifact id="jbossws-jboss42-src.zip"/>
<artifact id="jbossws-jbws42.sar"/>
<import componentref="jboss/jbossxb">
@@ -18,6 +16,9 @@
<import componentref="jboss/jbossws">
<compatible version="@repository.id(a)"/>
</import>
+ <import componentref="jboss/jbossws-jboss50">
+ <compatible version="@repository.id(a)"/>
+ </import>
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id(a)"/>
</import>
Modified: trunk/integration/jbws/src/main/etc/component-info-jbws50.xml
===================================================================
--- trunk/integration/jbws/src/main/etc/component-info-jbws50.xml 2007-05-22 20:32:33 UTC
(rev 3197)
+++ trunk/integration/jbws/src/main/etc/component-info-jbws50.xml 2007-05-23 04:03:24 UTC
(rev 3198)
@@ -5,8 +5,6 @@
version="@repository.id(a)"
licenseType="lgpl">
- <artifact id="jbossws-jboss50.jar"/>
- <artifact id="jbossws-jboss50-src.zip"/>
<artifact id="jbossws-jbws50.sar"/>
<artifact id="jbossws-jbws50-deployer.zip"/>
@@ -19,6 +17,9 @@
<import componentref="jboss/jbossws">
<compatible version="@repository.id(a)"/>
</import>
+ <import componentref="jboss/jbossws-jboss50">
+ <compatible version="@repository.id(a)"/>
+ </import>
<import componentref="jboss/jbossws-spi">
<compatible version="@repository.id(a)"/>
</import>
Copied: trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
(from rev 3195,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/FactoryLoader.java)
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/ws/integration/FactoryLoader.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -0,0 +1,197 @@
+/*
+ * 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;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+import org.jboss.logging.Logger;
+
+// $Id$
+
+/**
+ * Load a factory using the factory lookup procedure
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 14-Dec-2006
+ */
+public class FactoryLoader
+{
+ // provide logging
+ private static Logger log = Logger.getLogger(FactoryLoader.class);
+
+ private FactoryLoader()
+ {
+ }
+
+ /**
+ * Load a factory using this ordered lookup procedure
+ *
+ * 1. Use the system property
+ * 2. Use the properties file "lib/jaxm.properties" in the JRE directory
+ * 3. Use the Services API (as detailed in the JAR specification), if available, to
determine the classname
+ * 4. Use the default factory implementation class
+ *
+ * @return the factory impl, or null
+ */
+ public static Object loadFactory(String propertyName, String defaultFactory)
+ {
+ Object factory = null;
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+
+ // Use the system property
+ PrivilegedAction action = new PropertyAccessAction(propertyName);
+ String factoryName = (String)AccessController.doPrivileged(action);
+ if (factoryName != null)
+ {
+ try
+ {
+ if(log.isDebugEnabled()) log.debug("Load from system property: " +
factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
+ }
+ }
+
+ // Use the properties file "lib/jaxm.properties" in the JRE directory.
+ // This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system
property defined above.
+ if (factory == null)
+ {
+ action = new PropertyAccessAction("java.home");
+ String javaHome = (String)AccessController.doPrivileged(action);
+ File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
+ if (jaxmFile.exists())
+ {
+ try
+ {
+ action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
+ Properties jaxmProperties =
(Properties)AccessController.doPrivileged(action);
+ factoryName = jaxmProperties.getProperty(propertyName);
+ if (factoryName != null)
+ {
+ if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile +
": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName
+ ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
+ if (factory == null)
+ {
+ String filename = "META-INF/services/" + propertyName;
+ InputStream inStream = loader.getResourceAsStream(filename);
+ if (inStream != null)
+ {
+ try
+ {
+ BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
+ factoryName = br.readLine();
+ br.close();
+ if (factoryName != null)
+ {
+ if(log.isTraceEnabled()) log.trace("Load from Service API " +
filename + ": " + factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName
+ ": " + factoryName, t);
+ }
+ }
+ }
+
+ // Use the default factory implementation class.
+ if (factory == null && defaultFactory != null)
+ {
+ try
+ {
+ factoryName = defaultFactory;
+ if(log.isDebugEnabled()) log.debug("Load from default: " +
factoryName);
+ Class factoryClass = loader.loadClass(factoryName);
+ factory = factoryClass.newInstance();
+ }
+ catch (Throwable t)
+ {
+ throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
+ }
+ }
+
+ return factory;
+ }
+
+ private static class PropertyAccessAction implements PrivilegedAction
+ {
+ private String name;
+
+ PropertyAccessAction(String name)
+ {
+ this.name = name;
+ }
+
+ public Object run()
+ {
+ return System.getProperty(name);
+ }
+ }
+
+ private static class PropertyFileAccessAction implements PrivilegedAction
+ {
+ private String filename;
+
+ PropertyFileAccessAction(String filename)
+ {
+ this.filename = filename;
+ }
+
+ public Object run()
+ {
+ try
+ {
+ InputStream inStream = new FileInputStream(filename);
+ Properties props = new Properties();
+ props.load(inStream);
+ return props;
+ }
+ catch (IOException ex)
+ {
+ throw new SecurityException("Cannot load properties: " + filename,
ex);
+ }
+ }
+ }
+}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-05-22
20:32:33 UTC (rev 3197)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/invocation/SecurityAdaptorFactory.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -23,7 +23,7 @@
// $Id$
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
/**
* A container idependent SecurityAdaptorFactory
Deleted: trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/FactoryLoader.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/FactoryLoader.java 2007-05-22
20:32:33 UTC (rev 3197)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/utils/FactoryLoader.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -1,197 +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.spi.utils;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Properties;
-
-import org.jboss.logging.Logger;
-
-// $Id$
-
-/**
- * Load a factory using the factory lookup procedure
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 14-Dec-2006
- */
-public class FactoryLoader
-{
- // provide logging
- private static Logger log = Logger.getLogger(FactoryLoader.class);
-
- private FactoryLoader()
- {
- }
-
- /**
- * Load a factory using this ordered lookup procedure
- *
- * 1. Use the system property
- * 2. Use the properties file "lib/jaxm.properties" in the JRE directory
- * 3. Use the Services API (as detailed in the JAR specification), if available, to
determine the classname
- * 4. Use the default factory implementation class
- *
- * @return the factory impl, or null
- */
- public static Object loadFactory(String propertyName, String defaultFactory)
- {
- Object factory = null;
- ClassLoader loader = Thread.currentThread().getContextClassLoader();
-
- // Use the system property
- PrivilegedAction action = new PropertyAccessAction(propertyName);
- String factoryName = (String)AccessController.doPrivileged(action);
- if (factoryName != null)
- {
- try
- {
- if(log.isDebugEnabled()) log.debug("Load from system property: " +
factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
- }
- }
-
- // Use the properties file "lib/jaxm.properties" in the JRE directory.
- // This configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the system
property defined above.
- if (factory == null)
- {
- action = new PropertyAccessAction("java.home");
- String javaHome = (String)AccessController.doPrivileged(action);
- File jaxmFile = new File(javaHome + "/lib/jaxm.properties");
- if (jaxmFile.exists())
- {
- try
- {
- action = new PropertyFileAccessAction(jaxmFile.getCanonicalPath());
- Properties jaxmProperties =
(Properties)AccessController.doPrivileged(action);
- factoryName = jaxmProperties.getProperty(propertyName);
- if (factoryName != null)
- {
- if(log.isDebugEnabled()) log.debug("Load from " + jaxmFile +
": " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName
+ ": " + factoryName, t);
- }
- }
- }
-
- // Use the Services API (as detailed in the JAR specification), if available, to
determine the classname.
- if (factory == null)
- {
- String filename = "META-INF/services/" + propertyName;
- InputStream inStream = loader.getResourceAsStream(filename);
- if (inStream != null)
- {
- try
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(inStream,
"UTF-8"));
- factoryName = br.readLine();
- br.close();
- if (factoryName != null)
- {
- if(log.isTraceEnabled()) log.trace("Load from Service API " +
filename + ": " + factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName
+ ": " + factoryName, t);
- }
- }
- }
-
- // Use the default factory implementation class.
- if (factory == null && defaultFactory != null)
- {
- try
- {
- factoryName = defaultFactory;
- if(log.isDebugEnabled()) log.debug("Load from default: " +
factoryName);
- Class factoryClass = loader.loadClass(factoryName);
- factory = factoryClass.newInstance();
- }
- catch (Throwable t)
- {
- throw new IllegalStateException("Failed to load " + propertyName +
": " + factoryName, t);
- }
- }
-
- return factory;
- }
-
- private static class PropertyAccessAction implements PrivilegedAction
- {
- private String name;
-
- PropertyAccessAction(String name)
- {
- this.name = name;
- }
-
- public Object run()
- {
- return System.getProperty(name);
- }
- }
-
- private static class PropertyFileAccessAction implements PrivilegedAction
- {
- private String filename;
-
- PropertyFileAccessAction(String filename)
- {
- this.filename = filename;
- }
-
- public Object run()
- {
- try
- {
- InputStream inStream = new FileInputStream(filename);
- Properties props = new Properties();
- props.load(inStream);
- return props;
- }
- catch (IOException ex)
- {
- throw new SecurityException("Cannot load properties: " + filename,
ex);
- }
- }
- }
-}
Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java 2007-05-22
20:32:33 UTC (rev 3197)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/MessageFactory.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -24,7 +24,7 @@
import java.io.IOException;
import java.io.InputStream;
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
/**
A factory for creating SOAPMessage objects.
Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java 2007-05-22
20:32:33 UTC (rev 3197)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SAAJMetaFactory.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -21,7 +21,7 @@
*/
package javax.xml.soap;
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
// $Id$
Modified: trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java 2007-05-22 20:32:33
UTC (rev 3197)
+++ trunk/jbossws-core/src/main/java/javax/xml/soap/SOAPFactory.java 2007-05-23 04:03:24
UTC (rev 3198)
@@ -25,7 +25,7 @@
import javax.xml.namespace.QName;
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
import org.w3c.dom.Element;
/** SOAPFactory is a factory for creating various objects that exist in the SOAP XML
tree.
Modified: trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java
===================================================================
--- trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-05-22 20:32:33
UTC (rev 3197)
+++ trunk/jbossws-core/src/main/java/javax/xml/ws/spi/Provider.java 2007-05-23 04:03:24
UTC (rev 3198)
@@ -33,7 +33,7 @@
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.wsaddressing.W3CEndpointReference;
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
import org.w3c.dom.Element;
/**
Modified: trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java
===================================================================
--- trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-05-22
20:32:33 UTC (rev 3197)
+++ trunk/jbossws-core/src/main/java/org/jboss/ws/core/server/HttpServer.java 2007-05-23
04:03:24 UTC (rev 3198)
@@ -28,7 +28,7 @@
import javax.xml.ws.Endpoint;
-import org.jboss.wsf.spi.utils.FactoryLoader;
+import org.jboss.ws.integration.FactoryLoader;
/**
* An abstract HTTP Server