geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r924365 [1/3] - in /geronimo/specs/trunk: geronimo-activation_1.1_spec/src/main/java/javax/activation/ geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/ geronimo-el_2.2_spec/src/main/java/javax/el/ geronimo-jacc_1.1_spec/src/main/ja...
Date Wed, 17 Mar 2010 16:52:06 GMT
Author: rickmcguire
Date: Wed Mar 17 16:52:03 2010
New Revision: 924365

URL: http://svn.apache.org/viewvc?rev=924365&view=rev
Log:
GERONIMO-5090  Inconsistent handling of META-INF/services files by different Geronmo specs. 

Additional support in the locator and registry and updates to all spec projects except for jpa. 


Added:
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.BadClass
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoAccess
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoClass
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoConstructor
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itesta.MultiTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.itesta.TestTarget3
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.NoClass
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTargetLocal
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/pom.xml   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/itestb/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/itestb/TestTarget.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/itestb/TestTarget2.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/itestb/TestTarget3.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/java/org/apache/geronimo/osgi/itestb/TestTargetTwo.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/META-INF/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/META-INF/services/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.MultiTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/OSGI-INF/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/OSGI-INF/providers/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itestb/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/src/test/java/org/apache/geronimo/osgi/locator/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/src/test/java/org/apache/geronimo/osgi/locator/itest/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/src/test/java/org/apache/geronimo/osgi/locator/itest/NonOSGiLocatorTest.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/src/test/java/org/apache/geronimo/osgi/locator/itest/TestTarget.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/OSGiLocatorMultipleProviderTest.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/OSGiLocatorTest.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/TestTarget.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/TestTarget2.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/TestTarget3.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/TestTargetLocal.java   (with props)
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/itest/TestTargetTwo.java   (with props)
Removed:
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/src/test/java/org/apache/geronimo/osgi/registry/
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/OSGiLocatorMultipleProviderTest.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/OSGiLocatorTest.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/TestTarget.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/TestTarget2.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/TestTarget3.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/java/org/apache/geronimo/osgi/registry/TestTargetTwo.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/src/test/resources/
Modified:
    geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MailcapCommandMap.java
    geronimo/specs/trunk/geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/EJBContainer.java
    geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java
    geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/PolicyConfigurationFactory.java
    geronimo/specs/trunk/geronimo-jaspic_1.0_spec/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
    geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java
    geronimo/specs/trunk/geronimo-jaxb_2.2_spec/src/main/java/javax/xml/bind/ContextFinder.java
    geronimo/specs/trunk/geronimo-jaxr_1.0_spec/src/main/java/javax/xml/registry/ConnectionFactory.java
    geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/FactoryFinder.java
    geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/ServiceFactory.java
    geronimo/specs/trunk/geronimo-jaxws_2.1.1_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java
    geronimo/specs/trunk/geronimo-jaxws_2.2_spec/pom.xml
    geronimo/specs/trunk/geronimo-jaxws_2.2_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java
    geronimo/specs/trunk/geronimo-jpa_1.0_spec/src/main/java/javax/persistence/Persistence.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator-itests/pom.xml
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-locator/src/main/java/org/apache/geronimo/osgi/locator/ProviderLocator.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry-itests/pom.xml
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry/src/main/java/org/apache/geronimo/osgi/registry/ProviderBundleTrackerCustomizer.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry/src/main/java/org/apache/geronimo/osgi/registry/ProviderRegistryImpl.java
    geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-registry/src/main/java/org/apache/geronimo/osgi/registry/api/ProviderRegistry.java
    geronimo/specs/trunk/geronimo-osgi-support/pom.xml
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/pom.xml
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/FactoryFinder.java
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/MessageFactory.java
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SAAJMetaFactory.java
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPConnectionFactory.java
    geronimo/specs/trunk/geronimo-saaj_1.3_spec/src/main/java/javax/xml/soap/SOAPFactory.java
    geronimo/specs/trunk/geronimo-stax-api_1.0_spec/src/main/java/javax/xml/stream/FactoryLocator.java
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java

Modified: geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MailcapCommandMap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MailcapCommandMap.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MailcapCommandMap.java (original)
+++ geronimo/specs/trunk/geronimo-activation_1.1_spec/src/main/java/javax/activation/MailcapCommandMap.java Wed Mar 17 16:52:03 2010
@@ -469,7 +469,7 @@ public class MailcapCommandMap extends C
             cl = getClass().getClassLoader();
         }
         try {
-            return (DataContentHandler) ProviderLocator.loadClass(info.getCommandClass(), cl).newInstance();
+            return (DataContentHandler) ProviderLocator.loadClass(info.getCommandClass(), this.getClass(), cl).newInstance();
         } catch (ClassNotFoundException e) {
             return null;
         } catch (IllegalAccessException e) {

Modified: geronimo/specs/trunk/geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/EJBContainer.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/EJBContainer.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/EJBContainer.java (original)
+++ geronimo/specs/trunk/geronimo-ejb_3.1_spec/src/main/java/javax/ejb/embeddable/EJBContainer.java Wed Mar 17 16:52:03 2010
@@ -48,76 +48,46 @@ public abstract class EJBContainer {
     }
 
     public static EJBContainer createEJBContainer(java.util.Map<?, ?> properties) {
-
         if (properties == null) {
             properties = Collections.EMPTY_MAP;
         }
 
-        String providerName = null;
-
         Object o = properties.get(PROVIDER);
 
         if (o instanceof String) {
-            providerName = (String) o;
-        } else {
-            ClassLoader loader = Thread.currentThread().getContextClassLoader();
-            try {
-                String service = "META-INF/services/" + EJBContainerProvider.class.getName();
-                Enumeration<URL> providers = loader.getResources(service);
+            String providerName = (String) o;
 
-                while (providers.hasMoreElements()) {
+            Class providerClass;
 
-                    String name = getProviderName(providers.nextElement());
+            try {
+                providerClass = ProviderLocator.loadClass(providerName);
+            } catch (Exception e) {
+                throw new EJBException("Invalid or inaccessible provider class: " + providerName, e);
+            }
 
-                    if (name != null) {
-                        providerName = name;
-                        break;
-                    }
+            try {
+                EJBContainerProvider provider = (EJBContainerProvider) providerClass.newInstance();
+                return provider.createEJBContainer(properties);
+            } catch (Exception e) {
+                throw new EJBException("Provider error. Provider: " + providerName, e);
+            }
+        } else {
+            // do the services search processing.
+            try {
+                ClassLoader loader = Thread.currentThread().getContextClassLoader();
+                // go check the loader files.
+                EJBContainerProvider provider = (EJBContainerProvider)ProviderLocator.getService(EJBContainerProvider.class.getName(), EJBContainer.class, loader);
+                if (provider != null) {
+                    return provider.createEJBContainer(properties);
                 }
-            } catch (IOException e) {
+                else {
+                    throw new EJBException("Provider error. No provider definition found");
+                }
+            } catch (Exception e) {
+                throw new EJBException("Provider error. No provider found", e);
             }
         }
-
-        if (providerName == null) {
-            throw new EJBException("No provider found");
-        }
-
-        Class providerClass;
-
-        try {
-            providerClass = ProviderLocator.loadClass(providerName);
-        } catch (Exception e) {
-            throw new EJBException("Invalid or inaccessible provider class: " + providerName, e);
-        }
-
-        try {
-            EJBContainerProvider provider = (EJBContainerProvider) providerClass.newInstance();
-            return provider.createEJBContainer(properties);
-        } catch (Exception e) {
-            throw new EJBException("Provider error. Provider: " + providerName, e);
-        }
-    }
-
-    static String getProviderName(URL url) throws IOException {
-
-        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream(), "UTF-8"));
-
-        String providerName;
-
-        try {
-            providerName = in.readLine();
-        } finally {
-            in.close();
-        }
-
-        if (providerName != null) {
-            providerName = providerName.trim();
-        }
-
-        return providerName;
     }
 
     public abstract javax.naming.Context getContext();
-
-
 }

Modified: geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java (original)
+++ geronimo/specs/trunk/geronimo-el_2.2_spec/src/main/java/javax/el/ExpressionFactory.java Wed Mar 17 16:52:03 2010
@@ -17,13 +17,8 @@
 
 package javax.el;
 
-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.io.UnsupportedEncodingException;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Properties;
@@ -38,8 +33,6 @@ public abstract class ExpressionFactory 
 
     private static final String PLATFORM_DEFAULT_FACTORY_CLASS = "org.apache.el.ExpressionFactoryImpl";
 
-    private static final String EXPRESSION_FACTORY_SERVICE_ENTRY_URL = "META-INF/services/javax.el.ExpressionFactory";
-
     private static final String SYSTEM_PROPERTY_NAME = "javax.el.ExpressionFactory";
 
     private static final String JAVA_RUNTIME_PROPERTY_FILE_LOCATION = "lib" + File.separator + "el.properties";
@@ -99,80 +92,56 @@ public abstract class ExpressionFactory 
     }
 
     private static String lookupExpressionFactoryImplClass() {
-        ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        if (cl == null) {
-            cl = ClassLoader.getSystemClassLoader();
-        }
-        String implClassName = null;
-        implClassName = lookupByServiceEntryURL(cl);
+
+        String implClassName = lookupByJREPropertyFile();
         if (implClassName == null) {
-            implClassName = lookupByJREPropertyFile();
+            implClassName = System.getProperty(SYSTEM_PROPERTY_NAME);
             if (implClassName == null) {
-                implClassName = System.getProperty(SYSTEM_PROPERTY_NAME);
-                if (implClassName == null) {
-                    implClassName = PLATFORM_DEFAULT_FACTORY_CLASS;
-                }
+                implClassName = PLATFORM_DEFAULT_FACTORY_CLASS;
             }
         }
         return implClassName;
     }
 
-    private static String lookupByServiceEntryURL(ClassLoader cl) {
-        InputStream in = null;
-        try {
-            in = cl.getResourceAsStream(EXPRESSION_FACTORY_SERVICE_ENTRY_URL);
-            if (in != null) {
-                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
-                return bufferedReader.readLine().trim();
-            } else {
-                return null;
-            }
-        } catch (UnsupportedEncodingException e) {
-            throw new ELException("Fail to read " + EXPRESSION_FACTORY_SERVICE_ENTRY_URL, e);
-        } catch (IOException e) {
-            throw new ELException("Fail to read " + EXPRESSION_FACTORY_SERVICE_ENTRY_URL, e);
-        } finally {
-            if (in != null) {
-                try {
-                    in.close();
-                } catch (Exception e) {
-                }
-            }
-        }
+    private static Class<?> lookupByServiceEntryURL(ClassLoader cl) throws ClassNotFoundException {
+        // use the common lookup/parsing logic for the service files.
+        return ProviderLocator.getServiceClass(ExpressionFactory.class.getName(), ExpressionFactory.class, cl);
     }
 
     private static String lookupByJREPropertyFile() {
-        String jreDirectory = System.getProperty("java.home");
-        File configurationFile = new File(jreDirectory + File.separator + JAVA_RUNTIME_PROPERTY_FILE_LOCATION);
-        if (configurationFile.exists() && configurationFile.canRead()) {
-            Properties properties = new Properties();
-            InputStream in = null;
-            try {
-                in = new FileInputStream(configurationFile);
-                properties.load(in);
-                return properties.getProperty(SYSTEM_PROPERTY_NAME);
-            } catch (IOException e) {
-                throw new ELException("Fail to read " + configurationFile.getAbsolutePath(), e);
-            } finally {
-                if (in != null) {
-                    try {
-                        in.close();
-                    } catch (Exception e) {
-                    }
-                }
-            }
-        } else {
-            return null;
+        try {
+            return ProviderLocator.lookupByJREPropertyFile(JAVA_RUNTIME_PROPERTY_FILE_LOCATION, SYSTEM_PROPERTY_NAME);
+        } catch (IOException e) {
+            throw new ELException("Fail to read configuration file", e);
         }
     }
 
     private static Class<?> loadExpressionFactoryImplClass() {
+
         String implClassName = null;
         try {
+            ClassLoader cl = Thread.currentThread().getContextClassLoader();
+            if (cl == null) {
+                cl = ClassLoader.getSystemClassLoader();
+            }
+            // check the META-INF/services defintions first
+            Class<?> cls = lookupByServiceEntryURL(cl);
+            if (cls != null) {
+                return cls;
+            }
+            // try resolving using the alternate property lookups (always returns
+            // something, since there is a default
             implClassName = lookupExpressionFactoryImplClass();
-            return ProviderLocator.loadClass(implClassName);
+            return ProviderLocator.loadClass(implClassName, ExpressionFactory.class, cl);
         } catch (ClassNotFoundException e) {
-            throw new ELException("Fail to load implementation class " + implClassName, e);
+            // can be thrown either as a result of a classloading failure in the service
+            // lookup or a failure to directly load the class
+            if (implClassName != null) {
+                throw new ELException("Fail to load implementation class " + implClassName, e);
+            }
+            else {
+                throw new ELException("Fail to load implementation class", e);
+            }
         }
     }
 }

Modified: geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/PolicyConfigurationFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/PolicyConfigurationFactory.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/PolicyConfigurationFactory.java (original)
+++ geronimo/specs/trunk/geronimo-jacc_1.1_spec/src/main/java/javax/security/jacc/PolicyConfigurationFactory.java Wed Mar 17 16:52:03 2010
@@ -86,7 +86,7 @@ public abstract class PolicyConfiguratio
                         if (factoryClassName[0] == null) throw new ClassNotFoundException("Property " + FACTORY_NAME + " not set");
                         Thread currentThread = Thread.currentThread();
                         ClassLoader tccl = currentThread.getContextClassLoader();
-                        return ProviderLocator.loadClass(factoryClassName[0], tccl).newInstance();
+                        return ProviderLocator.loadClass(factoryClassName[0], PolicyConfigurationFactory.class, tccl).newInstance();
                     }
                 });
         } catch(PrivilegedActionException pae) {

Modified: geronimo/specs/trunk/geronimo-jaspic_1.0_spec/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaspic_1.0_spec/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaspic_1.0_spec/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java (original)
+++ geronimo/specs/trunk/geronimo-jaspic_1.0_spec/src/main/java/javax/security/auth/message/config/AuthConfigFactory.java Wed Mar 17 16:52:03 2010
@@ -65,7 +65,7 @@ public abstract class AuthConfigFactory 
                         .doPrivileged(new java.security.PrivilegedExceptionAction() {
                             public Object run() throws ClassNotFoundException, InstantiationException,
                                     IllegalAccessException {
-                                return ProviderLocator.loadClass(finalClassName, contextClassLoader).newInstance();
+                                return ProviderLocator.loadClass(finalClassName, this.getClass(), contextClassLoader).newInstance();
                             }
                         });
             } catch (PrivilegedActionException e) {

Modified: geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java (original)
+++ geronimo/specs/trunk/geronimo-javamail_1.4_spec/src/main/java/javax/mail/Session.java Wed Mar 17 16:52:03 2010
@@ -489,7 +489,7 @@ public final class Session {
             ClassLoader cl = getClassLoader();
             Class clazz = null;
             try {
-                clazz = ProviderLocator.loadClass(provider.getClassName(), cl);
+                clazz = ProviderLocator.loadClass(provider.getClassName(), this.getClass(), cl);
             } catch (ClassNotFoundException e) {
                 throw (NoSuchProviderException) new NoSuchProviderException("Unable to load class for provider: " + provider).initCause(e);
             }

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=924365&r1=924364&r2=924365&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 Wed Mar 17 16:52:03 2010
@@ -49,14 +49,18 @@ class ContextFinder {
         if (className == null) {
             className = System.getProperty(JAXB_CONTEXT_PROPERTY);
         }
-        if (className == null) {
-            String url = "META-INF/services/" + JAXB_CONTEXT_PROPERTY;
-            className = loadClassName(url, classLoader);
+        Class spi = null;
+        // if no specifically specified name, check for META-INF/services, and
+        // fall back to the default factory class if that fails
+        if (className == null) {
+            spi = loadSPIClass(JAXBContext.class, classLoader);
+            if (spi == null) {
+                spi = loadSpi(PLATFORM_DEFAULT_FACTORY_CLASS, classLoader);
+            }
         }
-        if (className == null) {
-            className = PLATFORM_DEFAULT_FACTORY_CLASS;
+        else {
+            spi = loadSpi(className, classLoader);
         }
-        Class spi = loadSpi(className, classLoader);
         try {
             Method m = spi.getMethod("createContext", new Class[] { String.class, ClassLoader.class, Map.class });
             return (JAXBContext) m.invoke(null, new Object[] { contextPath, classLoader, properties });
@@ -91,14 +95,20 @@ class ContextFinder {
         if (className == null) {
             className = System.getProperty(JAXB_CONTEXT_PROPERTY);
         }
-        if (className == null) {
-            String url = "META-INF/services/" + JAXB_CONTEXT_PROPERTY;
-            className = loadClassName(url, Thread.currentThread().getContextClassLoader());
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+        Class spi = null;
+        // if no specifically specified name, check for META-INF/services, and
+        // fall back to the default factory class if that fails
+        if (className == null) {
+            spi = loadSPIClass(JAXBContext.class, classLoader);
+            if (spi == null) {
+                spi = loadSpi(PLATFORM_DEFAULT_FACTORY_CLASS, classLoader);
+            }
         }
-        if (className == null) {
-            className = PLATFORM_DEFAULT_FACTORY_CLASS;
+        else {
+            spi = loadSpi(className, classLoader);
         }
-        Class spi = loadSpi(className, Thread.currentThread().getContextClassLoader());
         try {
             Method m = spi.getMethod("createContext", new Class[] { Class[].class, Map.class });
             return (JAXBContext) m.invoke(null, new Object[] { classes, properties });
@@ -135,31 +145,18 @@ class ContextFinder {
         }
     }
 
-    private static String loadClassName(String url, ClassLoader classLoader) throws JAXBException {
+    private static Class<?> loadSPIClass(Class<?> iface, ClassLoader classLoader) throws JAXBException {
         try {
-            InputStream is;
-            if (classLoader != null) {
-                is = classLoader.getResourceAsStream(url);
-            } else {
-                is = ClassLoader.getSystemResourceAsStream(url);
-            }
-            if (is != null) {
-                try {
-                    BufferedReader r = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-                    return r.readLine().trim();
-                } finally {
-                    is.close();
-                }
-            }
-            return null;
-        } catch (IOException e) {
-            throw new JAXBException(e);
+            // delegate this to common processing
+            return ProviderLocator.locateServiceClass(iface.getName(), ContextFinder.class,classLoader );
+        } catch (ClassNotFoundException e) {
+            throw new JAXBException("Provider " + iface.getName() + " not found", e);
         }
     }
 
     private static Class loadSpi(String className, ClassLoader classLoader) throws JAXBException {
         try {
-            return ProviderLocator.loadClass(className, classLoader);
+            return ProviderLocator.loadClass(className, ContextFinder.class, classLoader);
         } catch (ClassNotFoundException e) {
             throw new JAXBException("Provider " + className + " not found", e);
         }

Modified: geronimo/specs/trunk/geronimo-jaxr_1.0_spec/src/main/java/javax/xml/registry/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxr_1.0_spec/src/main/java/javax/xml/registry/ConnectionFactory.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxr_1.0_spec/src/main/java/javax/xml/registry/ConnectionFactory.java (original)
+++ geronimo/specs/trunk/geronimo-jaxr_1.0_spec/src/main/java/javax/xml/registry/ConnectionFactory.java Wed Mar 17 16:52:03 2010
@@ -51,7 +51,7 @@ public abstract class ConnectionFactory 
             cl = ConnectionFactory.class.getClassLoader();
         }
         try {
-            Class factoryClass = ProviderLocator.loadClass(className, cl);
+            Class factoryClass = ProviderLocator.loadClass(className, ConnectionFactory.class, cl);
             return (ConnectionFactory) factoryClass.newInstance();
         } catch (ClassNotFoundException e) {
             throw new JAXRException("Unable to load JAXR ConnectionFactoryClass: " + className, e);

Modified: geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/FactoryFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/FactoryFinder.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/FactoryFinder.java (original)
+++ geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/FactoryFinder.java Wed Mar 17 16:52:03 2010
@@ -104,7 +104,7 @@ class FactoryFinder {
         throws ConfigurationError
     {
         try {
-            return ProviderLocator.loadClass(className, classLoader).newInstance();
+            return ProviderLocator.loadClass(className, FactoryFinder.class, classLoader).newInstance();
         } catch (ClassNotFoundException x) {
             throw new ConfigurationError(
                 "Provider " + className + " not found", x);
@@ -129,11 +129,17 @@ class FactoryFinder {
      *
      * Package private so this code can be shared.
      */
-    static Object find(String factoryId, String fallbackClassName)
+    static Object find(Class<?> factoryType, String fallbackClassName)
         throws ConfigurationError
     {
+        String factoryId = factoryType.getName();
+
         debugPrintln("debug is on");
 
+        // NOTE:  The spec does not identify the search order for this,
+        // other than to note it can be overridden by the system property. The
+        // STAX ordering is used here.
+
         ClassLoader classLoader = findClassLoader();
 
         // Use the system property first
@@ -147,69 +153,26 @@ class FactoryFinder {
         } catch (SecurityException se) {
         }
 
-        // try to read from $java.home/lib/xml.properties
         try {
-            String javah=System.getProperty( "java.home" );
-            String configFile = javah + File.separator +
-                "lib" + File.separator + "jaxrpc.properties";
-            File f=new File( configFile );
-            if( f.exists()) {
-                Properties props=new Properties();
-                props.load( new FileInputStream(f));
-                String factoryClassName = props.getProperty(factoryId);
+            // try to read from $java.home/lib/jaxrpc.properties
+            String factoryClassName =  ProviderLocator.lookupByJREPropertyFile("lib" + File.separator + "jaxrpc.properties", factoryId);
+            if (factoryClassName != null) {
                 debugPrintln("found java.home property " + factoryClassName);
                 return newInstance(factoryClassName, classLoader);
             }
-        } catch(Exception ex ) {
+        } catch (Exception ex) {
             if( debug ) ex.printStackTrace();
         }
 
-        String serviceId = "META-INF/services/" + factoryId;
-        // try to find services in CLASSPATH
-        try {
-            InputStream is=null;
-            if (classLoader == null) {
-                is=ClassLoader.getSystemResourceAsStream( serviceId );
-            } else {
-                is=classLoader.getResourceAsStream( serviceId );
-            }
-
-            if( is!=null ) {
-                debugPrintln("found " + serviceId);
 
-                // Read the service provider name in UTF-8 as specified in
-                // the jar spec.  Unfortunately this fails in Microsoft
-                // VJ++, which does not implement the UTF-8
-                // encoding. Theoretically, we should simply let it fail in
-                // that case, since the JVM is obviously broken if it
-                // doesn't support such a basic standard.  But since there
-                // are still some users attempting to use VJ++ for
-                // development, we have dropped in a fallback which makes a
-                // second attempt using the platform's default encoding. In
-                // VJ++ this is apparently ASCII, which is a subset of
-                // UTF-8... and since the strings we'll be reading here are
-                // also primarily limited to the 7-bit ASCII range (at
-                // least, in English versions), this should work well
-                // enough to keep us on the air until we're ready to
-                // officially decommit from VJ++. [Edited comment from
-                // jkesselm]
-                BufferedReader rd;
-                try {
-                    rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-                } catch (java.io.UnsupportedEncodingException e) {
-                    rd = new BufferedReader(new InputStreamReader(is));
-                }
-
-                String factoryClassName = rd.readLine();
-                rd.close();
-
-                if (factoryClassName != null &&
-                    ! "".equals(factoryClassName)) {
-                    debugPrintln("loaded from services: " + factoryClassName);
-                    return newInstance(factoryClassName, classLoader);
-                }
+        try {
+            // check the META-INF/services definitions, and return it if
+            // we find something.
+            Object service = ProviderLocator.getService(factoryId, FactoryFinder.class, classLoader);
+            if (service != null) {
+                return service;
             }
-        } catch( Exception ex ) {
+        } catch (Exception ex) {
             if( debug ) ex.printStackTrace();
         }
 

Modified: geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/ServiceFactory.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/ServiceFactory.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/ServiceFactory.java (original)
+++ geronimo/specs/trunk/geronimo-jaxrpc_1.1_spec/src/main/java/javax/xml/rpc/ServiceFactory.java Wed Mar 17 16:52:03 2010
@@ -42,14 +42,6 @@ public abstract class ServiceFactory {
     protected ServiceFactory() {}
 
     /**
-     * A constant representing the property used to lookup the
-     * name of a <code>ServiceFactory</code> implementation
-     * class.
-     */
-    public static final java.lang.String SERVICEFACTORY_PROPERTY =
-        "javax.xml.rpc.ServiceFactory";
-
-    /**
      * Gets an instance of the <code>ServiceFactory</code>
      *
      * <p>Only one copy of a factory exists and is returned to the
@@ -66,7 +58,7 @@ public abstract class ServiceFactory {
         try {
             return (ServiceFactory) FactoryFinder.find(
                 /* The default property name according to the JAXRPC spec */
-                SERVICEFACTORY_PROPERTY,
+                ServiceFactory.class,
                 /* The fallback implementation class name */
                 "org.apache.axis.client.ServiceFactory");
         } catch (FactoryFinder.ConfigurationError e) {
@@ -95,15 +87,15 @@ public abstract class ServiceFactory {
      */
     public abstract Service createService(QName serviceName)
         throws ServiceException;
-    
+
     public abstract Service loadService(java.lang.Class class1)
                              throws ServiceException;
-    
+
     public abstract Service loadService(java.net.URL url,
                                     java.lang.Class class1,
                                     java.util.Properties properties)
                              throws ServiceException;
-    
+
     public abstract Service loadService(java.net.URL url,
                                     QName qname,
                                     java.util.Properties properties)

Modified: geronimo/specs/trunk/geronimo-jaxws_2.1.1_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxws_2.1.1_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxws_2.1.1_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java (original)
+++ geronimo/specs/trunk/geronimo-jaxws_2.1.1_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java Wed Mar 17 16:52:03 2010
@@ -125,7 +125,7 @@ class FactoryFinder {
             doPrivileged( new PrivilegedAction() {
                 public Object run() {
                     try {
-                        return ProviderLocator.loadClass(iClassName, iClassLoader).newInstance();
+                        return ProviderLocator.loadClass(iClassName, FactoryFinder.class, iClassLoader).newInstance();
                     } catch (ClassNotFoundException x) {
                         throw new ConfigurationError(
                                 "Provider " + iClassName + " not found", x);

Modified: geronimo/specs/trunk/geronimo-jaxws_2.2_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxws_2.2_spec/pom.xml?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxws_2.2_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-jaxws_2.2_spec/pom.xml Wed Mar 17 16:52:03 2010
@@ -56,6 +56,15 @@
     </scm>
 
     <dependencies>
+        <!-- NOTE:  Placing this one first ensures this is picking up the most recent locator
+             classes rather than potentially getting built with the ones residing inside
+             one of the other dependency spec jars -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-osgi-locator</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-saaj_1.3_spec</artifactId>
@@ -81,13 +90,6 @@
             <version>1.0-SNAPSHOT</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>
 
     <build>

Modified: geronimo/specs/trunk/geronimo-jaxws_2.2_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxws_2.2_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxws_2.2_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java (original)
+++ geronimo/specs/trunk/geronimo-jaxws_2.2_spec/src/main/java/javax/xml/ws/spi/FactoryFinder.java Wed Mar 17 16:52:03 2010
@@ -125,7 +125,7 @@ class FactoryFinder {
             doPrivileged( new PrivilegedAction<Object>() {
                 public Object run() {
                     try {
-                        return ProviderLocator.loadClass(iClassName, iClassLoader).newInstance();
+                        return ProviderLocator.loadClass(iClassName, FactoryFinder.class, iClassLoader).newInstance();
                     } catch (ClassNotFoundException x) {
                         throw new ConfigurationError(
                                 "Provider " + iClassName + " not found", x);
@@ -162,29 +162,28 @@ class FactoryFinder {
                 public Object run() {
                     debugPrintln("debug is on");
 
+                    // Section 6.2.1 of the jaxws spec gives lookup order as
+                    // 1.  META-INF/services definition
+                    // 2.  ${java.home}/lib/jaxws.properties file
+                    // 3.  System property
+                    // 4.  The default implementation class
+
                     ClassLoader classLoader = findClassLoader();
 
-                    // Use the system property first
                     try {
-                        String systemProp =
-                            System.getProperty(iFactoryId);
-                        if (systemProp != null) {
-                            debugPrintln("found system property " + systemProp);
-                            return newInstance(systemProp, classLoader);
+                        // check the META-INF/services definitions, and return it if
+                        // we find something.
+                        Object service = ProviderLocator.getService(iFactoryId, FactoryFinder.class, classLoader);
+                        if (service != null) {
+                            return service;
                         }
-                    } catch (SecurityException se) {
+                    } catch (Exception ex) {
+                        if (debug) ex.printStackTrace();
                     }
 
-                    // try to read from $java.home/lib/xml.properties
                     try {
-                        String javah = System.getProperty("java.home");
-                        String configFile = javah + File.separator +
-                        "lib" + File.separator + "jaxrpc.properties";
-                        File f = new File(configFile);
-                        if (f.exists()) {
-                            Properties props = new Properties();
-                            props.load(new FileInputStream(f));
-                            String factoryClassName = props.getProperty(iFactoryId);
+                        String factoryClassName =  ProviderLocator.lookupByJREPropertyFile("lib" + File.separator + "jaxrpc.properties", iFactoryId);
+                        if (factoryClassName != null) {
                             debugPrintln("found java.home property " + factoryClassName);
                             return newInstance(factoryClassName, classLoader);
                         }
@@ -192,53 +191,15 @@ class FactoryFinder {
                         if (debug) ex.printStackTrace();
                     }
 
-                    String serviceId = "META-INF/services/" + iFactoryId;
-                    // try to find services in CLASSPATH
+                    // Use the system property first
                     try {
-                        InputStream is = null;
-                        if (classLoader == null) {
-                            is = ClassLoader.getSystemResourceAsStream(serviceId);
-                        } else {
-                            is = classLoader.getResourceAsStream(serviceId);
-                        }
-
-                        if (is != null) {
-                            debugPrintln("found " + serviceId);
-
-                            // Read the service provider name in UTF-8 as specified in
-                            // the jar spec.  Unfortunately this fails in Microsoft
-                            // VJ++, which does not implement the UTF-8
-                            // encoding. Theoretically, we should simply let it fail in
-                            // that case, since the JVM is obviously broken if it
-                            // doesn't support such a basic standard.  But since there
-                            // are still some users attempting to use VJ++ for
-                            // development, we have dropped in a fallback which makes a
-                            // second attempt using the platform's default encoding. In
-                            // VJ++ this is apparently ASCII, which is a subset of
-                            // UTF-8... and since the strings we'll be reading here are
-                            // also primarily limited to the 7-bit ASCII range (at
-                            // least, in English versions), this should work well
-                            // enough to keep us on the air until we're ready to
-                            // officially decommit from VJ++. [Edited comment from
-                            // jkesselm]
-                            BufferedReader rd;
-                            try {
-                                rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
-                            } catch (java.io.UnsupportedEncodingException e) {
-                                rd = new BufferedReader(new InputStreamReader(is));
-                            }
-
-                            String factoryClassName = rd.readLine();
-                            rd.close();
-
-                            if (factoryClassName != null &&
-                                    ! "".equals(factoryClassName)) {
-                                debugPrintln("loaded from services: " + factoryClassName);
-                                return newInstance(factoryClassName, classLoader);
-                            }
+                        String systemProp =
+                            System.getProperty(iFactoryId);
+                        if (systemProp != null) {
+                            debugPrintln("found system property " + systemProp);
+                            return newInstance(systemProp, classLoader);
                         }
-                    } catch (Exception ex) {
-                        if (debug) ex.printStackTrace();
+                    } catch (SecurityException se) {
                     }
 
                     if (iFallbackClassName == null) {

Modified: geronimo/specs/trunk/geronimo-jpa_1.0_spec/src/main/java/javax/persistence/Persistence.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jpa_1.0_spec/src/main/java/javax/persistence/Persistence.java?rev=924365&r1=924364&r2=924365&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jpa_1.0_spec/src/main/java/javax/persistence/Persistence.java (original)
+++ geronimo/specs/trunk/geronimo-jpa_1.0_spec/src/main/java/javax/persistence/Persistence.java Wed Mar 17 16:52:03 2010
@@ -48,7 +48,7 @@ public class Persistence {
 
     protected static final Set<PersistenceProvider> providers = new HashSet<PersistenceProvider>();
     // Changed to the hard coded PERSISTENCE_PROVIDER value to pass signature tests.
-    // public static final java.lang.String PERSISTENCE_PROVIDER = PersistenceProvider.class.getName(); 
+    // public static final java.lang.String PERSISTENCE_PROVIDER = PersistenceProvider.class.getName();
     public static final java.lang.String PERSISTENCE_PROVIDER = "javax.persistence.spi.PeristenceProvider";
     static final String PERSISTENCE_PROVIDER_PROPERTY = "javax.persistence.provider";
     static final String PERSISTENCE_PROVIDER_SERVICE = "META-INF/services/"
@@ -159,7 +159,7 @@ public class Persistence {
         try {
             providerClass = Class.forName(providerName, true, Thread
                     .currentThread().getContextClassLoader());
-        } 
+        }
         catch (Exception e) {
             throw new PersistenceException(
                     "Invalid or inaccessible provider class: " + providerName,

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml Wed Mar 17 16:52:03 2010
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.geronimo.specs</groupId>
+        <artifactId>geronimo-osgi-support</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.specs</groupId>
+    <artifactId>geronimo-osgi-itesta</artifactId>
+    <packaging>bundle</packaging>
+    <name>Geronimo OSGi integration tests</name>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <description>
+Separately built test bundle for use in the various integration tests.  This
+bundle will have provider and services definitions used to test different class
+provider resolution scenarios.
+    </description>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
+                        <Private-Package>org.apache.geronimo.osgi.testa</Private-Package>
+                        <SPI-Provider>true</SPI-Provider>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class BadTarget {
+    public BadTarget() {
+        // causes an exception when instantiated.
+        throw new NullPointerException("Test exception");
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class NoAccess {
+    private NoAccess() {
+        // This is a private contstructor
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class NoConstructor {
+    public NoConstructor(int x) {
+        // causes newInstance() to fail because no no-argument constructor
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class TestTarget {
+    public TestTarget() {
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class TestTarget2 {
+    public TestTarget2() {
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget2";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class TestTarget3 {
+    public TestTarget3() {
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTarget3";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java Wed Mar 17 16:52:03 2010
@@ -0,0 +1,37 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.geronimo.osgi.itesta;
+
+public class TestTargetTwo {
+    public TestTargetTwo() {
+    }
+
+    @Override
+    /**
+     * The toString method is a simple means for determining
+     * which class has been instantiated without requiring
+     * interface classes to be exported by the test bundles.
+     *
+     * @return The unique identifier for this class.
+     */
+    public String toString() {
+        return "TestTargetTwo";
+    }
+}
+

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/java/org/apache/geronimo/osgi/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.BadClass
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.BadClass?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.BadClass (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.BadClass Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# This will thrown an exception when instantiated.
+org.apache.geronimo.osgi.itesta.BadTarget

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoAccess
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoAccess?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoAccess (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoAccess Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# private no-argument constructor for newInstance()
+org.apache.geronimo.osgi.itesta.NoAccess

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoClass
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoClass?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoClass (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoClass Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# This class should not be loadable...used to test error conditions.
+org.apache.geronimo.osgi.itesta.NoClass

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoConstructor
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoConstructor?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoConstructor (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.NoConstructor Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# No no-argument constructor for newInstance()
+org.apache.geronimo.osgi.itesta.NoConstructor

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itest.TestTarget Wed Mar 17 16:52:03 2010
@@ -0,0 +1,4 @@
+# Tests normal class mapping...NOTE:  this uses
+# TestTarget2 to ensure we're picking up the
+# services version, not the providers one.
+org.apache.geronimo.osgi.itesta.TestTarget2

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itesta.MultiTarget
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itesta.MultiTarget?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itesta.MultiTarget (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/META-INF/services/org.apache.geronimo.osgi.registry.itesta.MultiTarget Wed Mar 17 16:52:03 2010
@@ -0,0 +1,3 @@
+# Tests normal class mapping for multiple providers
+org.apache.geronimo.osgi.itesta.TestTarget
+org.apache.geronimo.osgi.itesta.TestTarget2

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.itesta.TestTarget3
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.itesta.TestTarget3?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.itesta.TestTarget3 (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.itesta.TestTarget3 Wed Mar 17 16:52:03 2010
@@ -0,0 +1 @@
+# Tests default class mapping...there are no class definitions here

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.NoClass
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.NoClass?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.NoClass (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.NoClass Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# This class should not be loadable...used to test error conditions.
+org.apache.geronimo.osgi.itesta.NoClass

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# Tests normal class mapping....
+org.apache.geronimo.osgi.itesta.TestTarget

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2 (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget2 Wed Mar 17 16:52:03 2010
@@ -0,0 +1 @@
+org.apache.geronimo.osgi.itesta.TestTargetTwo  # Used as an override to map TestTarget to TestTargetTwo

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4 (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTarget4 Wed Mar 17 16:52:03 2010
@@ -0,0 +1,4 @@
+# Tests normal class mapping....
+org.apache.geronimo.osgi.itesta.TestTarget
+# using multiple provider definitions for a single key
+org.apache.geronimo.osgi.itesta.TestTarget2

Added: geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTargetLocal
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTargetLocal?rev=924365&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTargetLocal (added)
+++ geronimo/specs/trunk/geronimo-osgi-support/geronimo-osgi-itesta/src/main/resources/OSGI-INF/providers/org.apache.geronimo.osgi.registry.itest.TestTargetLocal Wed Mar 17 16:52:03 2010
@@ -0,0 +1,2 @@
+# Tests normal class mapping....
+org.apache.geronimo.osgi.itesta.TestTarget



Mime
View raw message