geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r518436 - in /geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream: FactoryLocator.java XMLEventFactory.java XMLInputFactory.java XMLOutputFactory.java
Date Thu, 15 Mar 2007 01:43:36 GMT
Author: gawor
Date: Wed Mar 14 18:43:36 2007
New Revision: 518436

URL: http://svn.apache.org/viewvc?view=rev&rev=518436
Log:
use context class loader and implement XMLEventFactory.newInstance() methods

Modified:
    geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java
    geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLEventFactory.java
    geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLInputFactory.java
    geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLOutputFactory.java

Modified: geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java?view=diff&rev=518436&r1=518435&r2=518436
==============================================================================
--- geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java
(original)
+++ geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java
Wed Mar 14 18:43:36 2007
@@ -51,8 +51,8 @@
 
 	static Object locate(String factoryId, String altClassName)
 			throws FactoryConfigurationError {
-		return locate(factoryId, altClassName, FactoryLocator.class
-				.getClassLoader());
+		return locate(factoryId, altClassName,
+                              Thread.currentThread().getContextClassLoader());
 	}
 
 	static Object locate(String factoryId, String altClassName,
@@ -125,4 +125,4 @@
 					+ className + " could not be instantiated: " + x, x);
 		}
 	}
-}
\ No newline at end of file
+}

Modified: geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLEventFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLEventFactory.java?view=diff&rev=518436&r1=518435&r2=518436
==============================================================================
--- geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLEventFactory.java
(original)
+++ geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLEventFactory.java
Wed Mar 14 18:43:36 2007
@@ -43,14 +43,12 @@
 
 	public static XMLEventFactory newInstance()
 			throws FactoryConfigurationError {
-		// TODO Need to provide some default facvtory mechanism.
-		return null;
+            return (XMLEventFactory)FactoryLocator.locate("javax.xml.stream.XMLEventFactory",
"com.ctc.wstx.stax.WstxEventFactory");
 	}
 
 	public static XMLEventFactory newInstance(String factoryId,
 			ClassLoader classLoader) throws FactoryConfigurationError {
-		// TODO Need to provide some default facvtory mechanism.
-		return null;
+            return (XMLEventFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxEventFactory",
classLoader);
 	}
 
 	public abstract void setLocation(Location location);
@@ -117,4 +115,4 @@
 			String target, String data);
 
 	public abstract DTD createDTD(String dtd);
-}
\ No newline at end of file
+}

Modified: geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLInputFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLInputFactory.java?view=diff&rev=518436&r1=518435&r2=518436
==============================================================================
--- geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLInputFactory.java
(original)
+++ geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLInputFactory.java
Wed Mar 14 18:43:36 2007
@@ -38,13 +38,13 @@
 	public static XMLInputFactory newInstance()
 			throws FactoryConfigurationError {
 		// We'll assume the XMLInputFactory from the RI as a backup.
-		return (XMLInputFactory)FactoryLocator.locate("javax.xml.stream.XMLInputFactory", "com.bea.xml.stream.MXParserFactory");
+		return (XMLInputFactory)FactoryLocator.locate("javax.xml.stream.XMLInputFactory", "com.ctc.wstx.stax.WstxInputFactory");
 	}
 
 	public static XMLInputFactory newInstance(java.lang.String factoryId,
 			java.lang.ClassLoader classLoader) throws FactoryConfigurationError {
 		// We'll assume the XMLInputFactory from the RI as a backup.
-		return (XMLInputFactory)FactoryLocator.locate(factoryId, "com.bea.xml.stream.MXParserFactory",
classLoader);
+		return (XMLInputFactory)FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxInputFactory",
classLoader);
 	}
 
 	public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader)

Modified: geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLOutputFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLOutputFactory.java?view=diff&rev=518436&r1=518435&r2=518436
==============================================================================
--- geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLOutputFactory.java
(original)
+++ geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/XMLOutputFactory.java
Wed Mar 14 18:43:36 2007
@@ -26,15 +26,12 @@
 	
 	public static XMLOutputFactory newInstance()
 			throws FactoryConfigurationError {
-		return (XMLOutputFactory) FactoryLocator.locate(
-				"javax.xml.stream.XMLOutputFactory",
-				"com.bea.xml.stream.XMLOutputFactoryBase");
+		return (XMLOutputFactory) FactoryLocator.locate("javax.xml.stream.XMLOutputFactory", "com.ctc.wstx.stax.WstxOutputFactory");
 	}
 
 	public static XMLInputFactory newInstance(String factoryId,
 			java.lang.ClassLoader classLoader) throws FactoryConfigurationError {
-		return (XMLInputFactory) FactoryLocator.locate(factoryId,
-				"com.bea.xml.stream.XMLInputFactoryBase", classLoader);
+		return (XMLInputFactory) FactoryLocator.locate(factoryId, "com.ctc.wstx.stax.WstxOutputFactory",
classLoader);
 	}
 
 	public abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream)



Mime
View raw message