You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/11/01 14:46:10 UTC
svn commit: r709694 - in /servicemix/smx4/specs/trunk: ./
jaxp-api-1.3/src/main/java/org/xml/sax/helpers/ jaxp-api-1.4/
jaxp-api-1.4/src/main/java/javax/xml/stream/
jaxp-api-1.4/src/main/java/org/xml/sax/helpers/
Author: gnodet
Date: Sat Nov 1 06:46:00 2008
New Revision: 709694
URL: http://svn.apache.org/viewvc?rev=709694&view=rev
Log:
Add JAXP 1.4 API
Added:
servicemix/smx4/specs/trunk/jaxp-api-1.4/ (props changed)
- copied from r707355, servicemix/smx4/specs/trunk/jaxp-api-1.3/
servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/javax/xml/stream/ (props changed)
- copied from r701086, servicemix/smx4/specs/trunk/stax-api-1.0/src/main/java/javax/xml/stream/
Modified:
servicemix/smx4/specs/trunk/jaxp-api-1.3/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
servicemix/smx4/specs/trunk/jaxp-api-1.4/pom.xml
servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
servicemix/smx4/specs/trunk/pom.xml
Modified: servicemix/smx4/specs/trunk/jaxp-api-1.3/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxp-api-1.3/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java?rev=709694&r1=709693&r2=709694&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/jaxp-api-1.3/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java (original)
+++ servicemix/smx4/specs/trunk/jaxp-api-1.3/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java Sat Nov 1 06:46:00 2008
@@ -122,6 +122,15 @@
if (className == null) {
String service = "META-INF/services/" + property;
+ try {
+ // If we are deployed into an OSGi environment, leverage it
+ Class spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(service);
+ if (spiClass != null) {
+ return (XMLReader) spiClass.newInstance();
+ }
+ } catch (Throwable e) {
+ }
+
InputStream is = null;
// First try the Context ClassLoader
Propchange: servicemix/smx4/specs/trunk/jaxp-api-1.4/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Nov 1 06:46:00 2008
@@ -0,0 +1,9 @@
+target
+*.iml
+*.ipr
+*.iws
+.classpath
+.project
+.settings
+
+
Propchange: servicemix/smx4/specs/trunk/jaxp-api-1.4/
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: servicemix/smx4/specs/trunk/jaxp-api-1.4/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxp-api-1.4/pom.xml?rev=709694&r1=707355&r2=709694&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/jaxp-api-1.4/pom.xml (original)
+++ servicemix/smx4/specs/trunk/jaxp-api-1.4/pom.xml Sat Nov 1 06:46:00 2008
@@ -28,10 +28,10 @@
</parent>
<groupId>org.apache.servicemix.specs</groupId>
- <artifactId>org.apache.servicemix.specs.jaxp-api-1.3</artifactId>
+ <artifactId>org.apache.servicemix.specs.jaxp-api-1.4</artifactId>
<packaging>bundle</packaging>
<version>1.2-SNAPSHOT</version>
- <name>Apache ServiceMix Specs :: JAXP API 1.3</name>
+ <name>Apache ServiceMix Specs :: JAXP API 1.4</name>
<dependencies>
<dependency>
@@ -42,7 +42,7 @@
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
- <version>1.3.04</version>
+ <version>1.4.01-r709679</version>
</dependency>
</dependencies>
Propchange: servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/javax/xml/stream/
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java?rev=709694&r1=707355&r2=709694&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java (original)
+++ servicemix/smx4/specs/trunk/jaxp-api-1.4/src/main/java/org/xml/sax/helpers/XMLReaderFactory.java Sat Nov 1 06:46:00 2008
@@ -3,7 +3,7 @@
// Written by David Megginson
// and by David Brownell
// NO WARRANTY! This class is in the Public Domain.
-// $Id: XMLReaderFactory.java 226251 2005-06-21 19:19:22Z mrglavas $
+// $Id: XMLReaderFactory.java 670295 2008-06-22 01:46:43Z mrglavas $
package org.xml.sax.helpers;
import java.io.BufferedReader;
@@ -111,34 +111,43 @@
throws SAXException
{
String className = null;
- SecuritySupport ss = SecuritySupport.getInstance();
ClassLoader loader = NewInstance.getClassLoader ();
// 1. try the JVM-instance-wide system property
- try { className = ss.getSystemProperty (property); }
+ try { className = SecuritySupport.getSystemProperty (property); }
catch (Exception e) { /* normally fails for applets */ }
// 2. if that fails, try META-INF/services/
- if (className == null) {
+ if (className == null || className.length() == 0) {
String service = "META-INF/services/" + property;
+ try {
+ // If we are deployed into an OSGi environment, leverage it
+ Class spiClass = org.apache.servicemix.specs.locator.OsgiLocator.locate(service);
+ if (spiClass != null) {
+ return (XMLReader) spiClass.newInstance();
+ }
+ } catch (Throwable e) {
+ }
+
InputStream is = null;
+ className = null;
// First try the Context ClassLoader
- ClassLoader cl = ss.getContextClassLoader();
+ ClassLoader cl = SecuritySupport.getContextClassLoader();
if (cl != null) {
- is = ss.getResourceAsStream(cl, service);
+ is = SecuritySupport.getResourceAsStream(cl, service);
// If no provider found then try the current ClassLoader
if (is == null) {
cl = XMLReaderFactory.class.getClassLoader();
- is = ss.getResourceAsStream(cl, service);
+ is = SecuritySupport.getResourceAsStream(cl, service);
}
} else {
// No Context ClassLoader or JDK 1.1 so try the current
// ClassLoader
cl = XMLReaderFactory.class.getClassLoader();
- is = ss.getResourceAsStream(cl, service);
+ is = SecuritySupport.getResourceAsStream(cl, service);
}
if (is != null) {
Modified: servicemix/smx4/specs/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/specs/trunk/pom.xml?rev=709694&r1=709693&r2=709694&view=diff
==============================================================================
--- servicemix/smx4/specs/trunk/pom.xml (original)
+++ servicemix/smx4/specs/trunk/pom.xml Sat Nov 1 06:46:00 2008
@@ -41,6 +41,7 @@
<module>jaxb-api-2.0</module>
<module>jaxb-api-2.1</module>
<module>jaxp-api-1.3</module>
+ <module>jaxp-api-1.4</module>
<module>jaxws-api-2.0</module>
<module>jaxws-api-2.1</module>
<module>jbi-api-1.0</module>