You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ri...@apache.org on 2010/03/05 15:50:47 UTC
svn commit: r919435 - in /geronimo/specs/trunk/geronimo-jaxb_2.2_spec:
pom.xml src/main/java/javax/xml/bind/ContextFinder.java
Author: rickmcguire
Date: Fri Mar 5 14:50:46 2010
New Revision: 919435
URL: http://svn.apache.org/viewvc?rev=919435&view=rev
Log:
GERONIMO-5133 Geroinimo versions of the specs should pick up the additions made to the service mix versions of the bundles.
jaxb 2.2 updates.
Modified:
geronimo/specs/trunk/geronimo-jaxb_2.2_spec/pom.xml
geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java
Modified: geronimo/specs/trunk/geronimo-jaxb_2.2_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxb_2.2_spec/pom.xml?rev=919435&r1=919434&r2=919435&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxb_2.2_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-jaxb_2.2_spec/pom.xml Fri Mar 5 14:50:46 2010
@@ -59,6 +59,12 @@
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-osgi-locator</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<scm>
@@ -74,7 +80,14 @@
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
+ <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
+ <Specification-Title>JSR-222 Java Architecture for XML Binding 2.2</Specification-Title>
+ <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
+ <Specification-Version>2.2</Specification-Version>
<Export-Package>javax.xml.bind*;version=2.2</Export-Package>
+ <Import-Package>org.apache.geronimo.osgi.registry.api;resolution:=optional,*</Import-Package>
+ <Private-Package>org.apache.geronimo.osgi.locator</Private-Package>
+ <Bundle-Activator>org.apache.geronimo.osgi.locator.Activator</Bundle-Activator>
</instructions>
</configuration>
</plugin>
Modified: geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java?rev=919435&r1=919434&r2=919435&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java (original)
+++ geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java Fri Mar 5 14:50:46 2010
@@ -24,6 +24,8 @@
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import org.apache.geronimo.osgi.locator.ProviderLocator;
+
class ContextFinder {
private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "com.sun.xml.bind.v2.ContextFactory";
@@ -164,7 +166,11 @@
spiClass = Class.forName(className);
}
} catch (ClassNotFoundException e) {
- throw new JAXBException("Provider " + className + " not found", e);
+ // last gasp, use the OSGi locator to try to find this
+ spiClass = ProviderLocator.locate(className);
+ if (spiClass == null) {
+ throw new JAXBException("Provider " + className + " not found", e);
+ }
}
return spiClass;
}