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/09/15 13:34:04 UTC

svn commit: r997288 [1/2] - in /geronimo/sandbox/rick/serviceloader: ./ geronimo-endorsed-serviceloader/ geronimo-endorsed-serviceloader/src/ geronimo-endorsed-serviceloader/src/main/ geronimo-endorsed-serviceloader/src/main/java/ geronimo-endorsed-ser...

Author: rickmcguire
Date: Wed Sep 15 11:34:01 2010
New Revision: 997288

URL: http://svn.apache.org/viewvc?rev=997288&view=rev
Log:
experimental ServiceLoader replacement that can interact with the Geronimo OSGi provider registry

Added:
    geronimo/sandbox/rick/serviceloader/
    geronimo/sandbox/rick/serviceloader/LICENSE
    geronimo/sandbox/rick/serviceloader/NOTICE
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.BadClass
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.NoAccess
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.NoClass
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.NoConstructor
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.TestInterface
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.TestInterface2
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/BadClass.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/NoAccess.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/NoClass.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/NoConstructor.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/NotFound.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/TestInterface.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/TestInterface2.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestapi/src/main/java/org/apache/geronimo/serviceloader/itestapi/TestInterface3.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/geronimo/serviceloader/itestb/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/geronimo/serviceloader/itestb/TestTarget.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/java/org/apache/geronimo/serviceloader/itestb/TestTarget2.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/resources/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/resources/META-INF/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/resources/META-INF/services/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.TestInterface
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itestb/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.TestInterface2
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/pom.xml   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/OSGiServiceLoaderTest.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/TestTarget.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/TestTarget2.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/TestTarget3.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/TestTargetLocal.java   (with props)
    geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itests/src/test/java/org/apache/geronimo/serviceloader/itest/TestTargetTwo.java   (with props)
    geronimo/sandbox/rick/serviceloader/pom.xml   (with props)

Added: geronimo/sandbox/rick/serviceloader/LICENSE
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/LICENSE?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/LICENSE (added)
+++ geronimo/sandbox/rick/serviceloader/LICENSE Wed Sep 15 11:34:01 2010
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+

Added: geronimo/sandbox/rick/serviceloader/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/NOTICE?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/NOTICE (added)
+++ geronimo/sandbox/rick/serviceloader/NOTICE Wed Sep 15 11:34:01 2010
@@ -0,0 +1,21 @@
+Apache Geronimo 
+Copyright 2003-2009 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software developed by
+The Object Management Group.
+
+Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
+duplicate and use this code are hereby granted provided that this
+copyright notice is included.
+
+This product includes software developed by
+The W3C Consortium (http://www.w3.org/).
+
+Copyright © 1994-2002 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, Institut National 
+de Recherche en Informatique et en Automatique, Keio 
+University). All Rights Reserved. 
+http://www.w3.org/Consortium/Legal/

Added: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml Wed Sep 15 11:34:01 2010
@@ -0,0 +1,43 @@
+<?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.components</groupId>
+        <artifactId>geronimo-serviceloader</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.components</groupId>
+    <artifactId>geronimo-endorsed-serviceloader</artifactId>
+    <packaging>jar</packaging>
+    <name>Apache Geronimo OSGi-enabled ServiceLoader replacement</name>
+    <version>1.0-SNAPSHOT</version>
+
+    <description>
+This jar needs to be part of the java runtime's endorsed classpath to override 
+the resident ServiceLoader class implementation. 
+    </description>
+</project>

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java Wed Sep 15 11:34:01 2010
@@ -0,0 +1,291 @@
+/*
+ *  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 java.util;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import org.apache.geronimo.serviceloader.OSGiServiceLoader;
+
+/**
+ * Service loader is a service-provider loading utility class.
+ * @param <S>
+ *
+ * @since 1.6
+ */
+public final class ServiceLoader<S> implements Iterable<S> {
+
+    private static final String META_INF_SERVICES = "META-INF/services/"; //$NON-NLS-1$
+
+    private Set<URL> services;
+
+    private Class<S> service;
+
+    private ClassLoader loader;
+
+    private Iterator osgiServices;
+
+    private ServiceLoader(){
+        // do nothing
+    }
+
+    /**
+     * reloads the services
+     *
+     */
+    public void reload() {
+        internalLoad(this, service, loader);
+    }
+
+    /**
+     * Answers the iterator of this ServiceLoader
+     *
+     * @return the iterator of this ServiceLoader
+     */
+    public Iterator<S> iterator() {
+        return new ServiceIterator(this);
+    }
+
+    /**
+     * Constructs a serviceloader.
+     *
+     * @param service
+     *            the given service class or interface
+     * @param loader
+     *            the given class loader
+     * @return a new ServiceLoader
+     */
+    public static <S> ServiceLoader<S> load(Class<S> service, ClassLoader loader) {
+        ServiceLoader<S> sl = new ServiceLoader<S>();
+        sl.service = service;
+        sl.loader = loader;
+        sl.services = new HashSet<URL>();
+        internalLoad(sl, service, loader);
+        return sl;
+    }
+
+    // try to find all jars that contains the service. Note according to the
+    // lazy load, the service will not load this time.
+    private static void internalLoad(ServiceLoader<?> sl, Class<?> service,
+            ClassLoader loader) {
+        // get any services from the OSGi registry, if it's available.
+        sl.osgiServices = OSGiServiceLoader.getServices(service);
+        Enumeration<URL> profiles = null;
+        if (null == service) {
+            sl.services.add(null);
+            return;
+        }
+        try {
+            if (null == loader) {
+                profiles = ClassLoader.getSystemResources(META_INF_SERVICES
+                        + service.getName());
+            } else {
+                profiles = loader.getResources(META_INF_SERVICES
+                        + service.getName());
+            }
+        } catch (IOException e) {
+            return;
+        }
+        if (null != profiles) {
+            while (profiles.hasMoreElements()) {
+                URL url = profiles.nextElement();
+                sl.services.add(url);
+            }
+        }
+    }
+
+    /**
+     * Constructs a serviceloader.
+     *
+     * @param service
+     *            the given service class or interface
+     * @return a new ServiceLoader
+     */
+    public static <S> ServiceLoader<S> load(Class<S> service) {
+        return ServiceLoader.load(service, Thread.currentThread()
+                .getContextClassLoader());
+    }
+
+    /**
+     * Constructs a serviceloader with extension class loader.
+     *
+     * @param service
+     *            the given service class or interface
+     * @return a new ServiceLoader
+     */
+    public static <S> ServiceLoader<S> loadInstalled(Class<S> service) {
+        // extClassLoader
+        ClassLoader cl = ClassLoader.getSystemClassLoader();
+        if (null != cl) {
+            while (null != cl.getParent()) {
+                cl = cl.getParent();
+            }
+        }
+        return ServiceLoader.load(service, cl);
+    }
+
+    /**
+     * Answers a string that indicate the information of this ServiceLoader
+     *
+     * @return a string that indicate the information of this ServiceLoader
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("ServiceLoader of "); //$NON-NLS-1$
+        sb.append(service.getName());
+        return sb.toString();
+    }
+
+    // inner class for returning
+    private class ServiceIterator implements Iterator<S> {
+
+        private static final String SINGLE_SHARP = "#"; //$NON-NLS-1$
+
+        private ClassLoader cl;
+
+        // services obtained from the OSGi ProviderRegistry
+        private Iterator osgiServices;
+
+        private Class<S> service;
+
+        private Set<URL> services;
+
+        private BufferedReader reader = null;
+
+        private boolean isRead = false;
+
+        private Queue<String> que;
+
+        public ServiceIterator(ServiceLoader<S> sl) {
+            cl = sl.loader;
+            service = sl.service;
+            services = sl.services;
+            osgiServices = sl.osgiServices;
+        }
+
+        public boolean hasNext() {
+            // if running on behalf of an OSGi environment, we might have
+            // registered services to process.  Handle those first, then
+            // perform classpath loads
+            if (osgiServices != null) {
+                // if there is something left, return that
+                if (osgiServices.hasNext()) {
+                    return true;
+                }
+                // once this indicates there are no more services, then revert
+                // to the old behavior
+                osgiServices = null;
+            }
+
+            if (!isRead) {
+                readClass();
+            }
+            if (null != que && !que.isEmpty()) {
+                return true;
+            }
+            return false;
+        }
+
+        @SuppressWarnings("unchecked")
+        public S next() {
+            if (!hasNext()) {
+                throw new NoSuchElementException();
+            }
+            // if we have an iterator for the services, then get the
+            // value from that iterator
+            if (osgiServices != null) {
+                return (S)osgiServices.next();
+            }
+
+            String clsName = que.remove();
+            try {
+                S ret;
+                if (null == cl) {
+                    ret = service.cast(Class.forName(clsName).newInstance());
+                } else {
+                    ret = service.cast(cl.loadClass(clsName).newInstance());
+                }
+                return ret;
+            } catch (Exception e) {
+                // according to spec, this is a special design
+                throw new ServiceConfigurationError("Failure creating service implementation from class " + clsName, e);
+            }
+        }
+
+        private void readClass() {
+            if (null == services) {
+                isRead = true;
+                return;
+            }
+            Iterator<URL> iter = services.iterator();
+            que = new LinkedList<String>();
+            while (iter.hasNext()) {
+                URL url = iter.next();
+                if (null == url) {
+                    // follow RI
+                    throw new NullPointerException();
+                }
+                try {
+                    reader = new BufferedReader(new InputStreamReader(url
+                            .openStream(), "UTF-8")); //$NON-NLS-1$
+
+                    String str;
+                    // find class name (skip lines starts with "#")
+                    while (true) {
+                        str = reader.readLine();
+                        if (null == str) {
+                            break;
+                        }
+                        String[] strs = str.trim().split(SINGLE_SHARP);
+                        if (0 != strs.length) {
+                            str = strs[0].trim();
+                            if (!(str.startsWith(SINGLE_SHARP) || 0 == str
+                                    .length())) {
+                                // a java class name, check if identifier
+                                // correct
+                                char[] namechars = str.toCharArray();
+                                for (int i = 0; i < namechars.length; i++) {
+                                    if (!(Character
+                                            .isJavaIdentifierPart(namechars[i]) || namechars[i] == '.')) {
+                                        throw new ServiceConfigurationError("Invalid character in class name \"" + namechars[i] +"\""); 
+                                    }
+                                }
+                                // correct, if it does not exist in the que, add
+                                // it to que
+                                if (!que.contains(str)) {
+                                    que.add(str);
+                                }
+                            }
+                        }
+                    }
+                } catch (Exception e) {
+                    // according to spec, this is a special design
+                    throw new ServiceConfigurationError("Unable to process service configuration " + url, e);
+                }
+            }
+            isRead = true;
+        }
+
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+
+    }
+}
+

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/java/util/ServiceLoader.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java Wed Sep 15 11:34:01 2010
@@ -0,0 +1,140 @@
+/*
+ *  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.serviceloader;
+ 
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException; 
+import java.util.ServiceConfigurationError; 
+
+/**
+ * Service loader is a service-provider loading utility class.
+ * @param <S>
+ *
+ * @since 1.6
+ */
+public class OSGiServiceLoader {
+
+    // the wappered providerRegistry 
+    private static ProviderRegistryWrapper providerRegistry; 
+
+    private OSGiServiceLoader(){
+        // do nothing
+    }
+    
+    
+    /**
+     * handle an injected ProviderRegistry instance from an
+     * activated bundle
+     * 
+     * @param r      The ProviderRegistry instance, passed as an opaque object.
+     */
+    static public void setRegistry(Object r) {
+        // we might be clearing 
+        if (r == null) {
+            providerRegistry = null; 
+        }
+        else {
+            providerRegistry = new ProviderRegistryWrapper(r); 
+        }
+    }
+    
+    
+    /**
+     * Return an iterator for instantiating all services matching 
+     * the given service type. 
+     * 
+     * @param cls    The target interface class.
+     * 
+     * @return An iterator for traversing the set of registered classes 
+     *         or null if no matching classes are found.
+     */
+    static public Iterator getServices(Class<?> cls) {
+        // check the registry 
+        List<Class<?>> classes = getClasses(cls); 
+        // return nothing if there are no hits 
+        if (classes == null) {
+            return null; 
+        }
+        
+        // return the wrappered iterator 
+        return new OSGiServiceIterator(cls, classes); 
+    }
+    
+    
+    /**
+     * Return a list of all matching implementing classes for     
+     * the given service type. 
+     * 
+     * @param cls    The target interface class.
+     * 
+     * @return An iterator for traversing the set of registered classes 
+     *         or null if no matching classes are found.
+     */
+    static public List<Class<?>> getServiceClasses(Class<?> cls) {
+        // check the registry 
+        return getClasses(cls); 
+    }
+    
+    static public List<Class<?>> getClasses(Class<?> target)  {
+        // no active provider registry?  We didn't find this 
+        if (providerRegistry == null) {
+            return null; 
+        }
+        // ping the registry for the class list 
+        return providerRegistry.getServiceClasses(target.getName()); 
+    }
+
+    // inner class for returning
+    static private class OSGiServiceIterator implements Iterator {
+        // implementer classes obtained from the ProviderRegistry 
+        private Iterator<Class<?>> osgiServiceClasses;
+        // the service class we're providing instances of 
+        private Class<?> service;
+
+        public OSGiServiceIterator(Class<?> service, List<Class<?>> serviceClasses) {
+            this.service = service; 
+            osgiServiceClasses = serviceClasses.iterator(); 
+        }
+
+        public boolean hasNext() {
+            // allow the list of services handle this 
+            return osgiServiceClasses.hasNext(); 
+        }
+        
+
+        @SuppressWarnings("unchecked")
+        public Object next() {
+            if (!hasNext()) {
+                throw new NoSuchElementException();
+            }
+            
+            Class<?> cls = osgiServiceClasses.next(); 
+            try {
+                // create an instance of this class 
+                return service.cast(cls.newInstance()); 
+            } catch (Throwable e) {
+                throw new ServiceConfigurationError("unable to instantiate provider from class " + cls.getName(), e);
+            }
+        }
+        public void remove() {
+            throw new UnsupportedOperationException();
+        }
+    }
+}
+
+

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/OSGiServiceLoader.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java Wed Sep 15 11:34:01 2010
@@ -0,0 +1,71 @@
+/*
+ *  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.serviceloader;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.List;
+
+/**
+ * A wrapper around the ProviderRegistry to allow dynamic access to 
+ * an OSGi bundle-resident service from code loaded off of the bootstrap 
+ * classpath. 
+ */
+public class ProviderRegistryWrapper {
+    // this is the injected registry object 
+    private Object providerRegistry; 
+    // the method used to query the provider registry for service information 
+    private Method getServiceClassesMethod; 
+    
+    public ProviderRegistryWrapper(Object registry) throws IllegalArgumentException {
+        providerRegistry = registry; 
+        Class<?> registryClass = providerRegistry.getClass(); 
+        
+        try {
+            // get the getServiceClasses method use for the service call 
+            getServiceClassesMethod = registryClass.getMethod("getServiceClasses", String.class);
+        } catch (NoSuchMethodException e) {
+            throw new IllegalArgumentException("Invalid provider registry provided", e); 
+        }
+    }
+    
+    
+    /**
+     * Perform a provider registry lookup using the given 
+     * interface class. 
+     * 
+     * @param factoryId The required interface class.
+     * 
+     * @return A list of all matching provider classes or null if there are 
+     *         no matches.
+     */
+    public List<Class<?>> getServiceClasses(String factoryId) {
+        try {
+            List<Class<?>> classes = (List<Class<?>>)getServiceClassesMethod.invoke(providerRegistry, factoryId);
+            // return null if there are no matching classes 
+            if (classes.isEmpty()) {
+                return null; 
+            }
+            return classes; 
+        } catch (InvocationTargetException e) {
+            // any errors, then just fail this 
+            return null; 
+        } catch (IllegalAccessException e) {
+            throw new IllegalArgumentException("Invalid provider registry provided", e); 
+        }
+    }
+}
+

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-endorsed-serviceloader/src/main/java/org/apache/geronimo/serviceloader/ProviderRegistryWrapper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml Wed Sep 15 11:34:01 2010
@@ -0,0 +1,77 @@
+<?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.components</groupId>
+        <artifactId>geronimo-serviceloader</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.components</groupId>
+    <artifactId>geronimo-serviceloader-activator</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Geronimo OSGI serviceloader activator</name>
+    <version>1.0-SNAPSHOT</version>
+
+    <description>
+This bundle contains a simple ServiceTracker that will inject the 
+ProviderRegistry service implementation into the OSGiServiceLoader 
+instance loaded from the bootstrap classpath.  The OSGi boot environment 
+must export the org.apache.geronimo.serviceloader package in order 
+for this to work.  
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.2.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>org.apache.geronimo.serviceloader;resolution:=optional,*</Import-Package>
+                        <Bundle-SymbolicName>${groupId}.${artifactId};singleton=true</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.geronimo.serviceloader.activator.Activator</Bundle-Activator>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java Wed Sep 15 11:34:01 2010
@@ -0,0 +1,85 @@
+/**
+ * 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.serviceloader.activator;
+
+import java.lang.reflect.Method;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+public class Activator implements BundleActivator {
+    // a service tracker for the registry service
+    private ServiceTracker registryTracker;
+
+    public synchronized void start(final BundleContext bundleContext) throws Exception {
+        // initialize the locator
+        registryTracker = new ServiceTracker(bundleContext, "org.apache.geronimo.osgi.registry.api.ProviderRegistry", 
+            new ServiceTrackerCustomizer() {
+                public Object addingService(ServiceReference reference) {
+                    Object service = bundleContext.getService(reference);
+                    try {
+                        // dynamically look up the service loader class and stuff the current 
+                        // registry service instance into that class.  It will use reflection to 
+                        // lookup the services.  If there are any errors, we don't track the service 
+                        // instance. 
+                        Class<?> cls = bundleContext.getBundle().loadClass("org.apache.geronimo.serviceloader.OSGiServiceLoader"); 
+                        Method setRegistry = cls.getMethod("setRegistry", Object.class); 
+                        setRegistry.invoke(null, service); 
+                        return service; 
+                    } catch (Throwable e) {
+                        return null;    // don't track this if we can't set 
+                    }
+                }
+
+                public void modifiedService(ServiceReference reference, Object obj) {
+                }
+
+                public void removedService(ServiceReference reference, Object obj) {
+                    try {
+                        // dynamically look up the service loader class and stuff the current 
+                        // registry service instance into that class.  It will use reflection to 
+                        // lookup the services.  If there are any errors, we don't track the service 
+                        // instance. 
+                        Class<?> cls = Class.forName("org.apache.geronimo.serviceloader.OSGiServiceLoader"); 
+                        Method setRegistry = cls.getMethod("setRegistry", Object.class); 
+                        setRegistry.invoke(null, (Object)null); 
+                        
+                    } catch (Throwable e) {
+                        // just ignore 
+                    }
+                }
+            }
+        );
+        registryTracker.open();
+        // do this last...it helps indicate if we have an initialized registry.
+    }
+
+    public synchronized void stop(BundleContext bundleContext) throws Exception {
+        // shut down the tracker 
+        registryTracker.close();
+        this.registryTracker = null; 
+    }
+
+    public void bundleChanged(BundleEvent event) {
+        // nothing to change here
+    }
+}
+

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-activator/src/main/java/org/apache/geronimo/serviceloader/activator/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml Wed Sep 15 11:34:01 2010
@@ -0,0 +1,69 @@
+<?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.components</groupId>
+        <artifactId>geronimo-serviceloader</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.geronimo.components</groupId>
+    <artifactId>geronimo-serviceloader-itesta</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Geronimo OSGi ServiceLoader integration tests bundle itesta</name>
+    <version>1.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>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.geronimo.components</groupId>
+            <artifactId>geronimo-serviceloader-itestapi</artifactId>
+        </dependency>
+    </dependencies>
+
+
+    <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.serviceloader.testa</Private-Package>
+                        <SPI-Provider>true</SPI-Provider>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class BadTarget implements org.apache.geronimo.serviceloader.itestapi.BadClass {
+    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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/BadTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class NoAccess  implements org.apache.geronimo.serviceloader.itestapi.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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoAccess.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class NoConstructor  implements org.apache.geronimo.serviceloader.itestapi.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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/NoConstructor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class TestTarget  implements org.apache.geronimo.serviceloader.itestapi.TestInterface {
+    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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class TestTarget2  implements org.apache.geronimo.serviceloader.itestapi.TestInterface2 {
+    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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class TestTarget2a  implements org.apache.geronimo.serviceloader.itestapi.TestInterface2 {
+    public TestTarget2a() {
+    }
+
+    @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 "TestTarget2a";
+    }
+}
+

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget2a.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class TestTarget3  implements org.apache.geronimo.serviceloader.itestapi.TestInterface {
+    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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTarget3.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java Wed Sep 15 11:34:01 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.serviceloader.itesta;
+
+public class TestTargetTwo  implements org.apache.geronimo.serviceloader.itestapi.TestInterface {
+    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/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/java/org/apache/geronimo/serviceloader/itesta/TestTargetTwo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.BadClass
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.BadClass?rev=997288&view=auto
==============================================================================
--- geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.BadClass (added)
+++ geronimo/sandbox/rick/serviceloader/geronimo-serviceloader-itesta/src/main/resources/META-INF/services/org.apache.geronimo.serviceloader.itestapi.BadClass Wed Sep 15 11:34:01 2010
@@ -0,0 +1,18 @@
+# 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.
+# This will throw an exception when instantiated.
+org.apache.geronimo.serviceloader.itesta.BadTarget



Re: svn commit: r997288 [1/2] - in /geronimo/sandbox/rick/serviceloader

Posted by Rick McGuire <ri...@gmail.com>.
  On 9/16/2010 3:06 PM, Donald Woods wrote:
> Is the below really needed in the NOTICE file?
Oops, definitely not.  I just copied the NOTICE file from another 
project when I pulled that together.  Now I need to see if I can 
remember the original source, since I suspect it doesn't apply there 
either.

Rick
> +This product includes software developed by
> +The Object Management Group.
> +
> +Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
> +duplicate and use this code are hereby granted provided that this
> +copyright notice is included.
> +
> +This product includes software developed by
> +The W3C Consortium (http://www.w3.org/).
> +
> +Copyright © 1994-2002 World Wide Web Consortium,
> +(Massachusetts Institute of Technology, Institut National
> +de Recherche en Informatique et en Automatique, Keio
> +University). All Rights Reserved.
> +http://www.w3.org/Consortium/Legal/
>
>
> On 9/15/10 7:34 AM, rickmcguire@apache.org wrote:
>> +This product includes software developed by
>> +The Object Management Group.
>> +
>> +Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
>> +duplicate and use this code are hereby granted provided that this
>> +copyright notice is included.
>> +
>> +This product includes software developed by
>> +The W3C Consortium (http://www.w3.org/).
>> +
>> +Copyright © 1994-2002 World Wide Web Consortium,
>> +(Massachusetts Institute of Technology, Institut National
>> +de Recherche en Informatique et en Automatique, Keio
>> +University). All Rights Reserved.
>> +http://www.w3.org/Consortium/Legal/


Re: svn commit: r997288 [1/2] - in /geronimo/sandbox/rick/serviceloader

Posted by Donald Woods <dw...@apache.org>.
Is the below really needed in the NOTICE file?

+This product includes software developed by
+The Object Management Group.
+
+Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
+duplicate and use this code are hereby granted provided that this
+copyright notice is included.
+
+This product includes software developed by
+The W3C Consortium (http://www.w3.org/).
+
+Copyright © 1994-2002 World Wide Web Consortium,
+(Massachusetts Institute of Technology, Institut National
+de Recherche en Informatique et en Automatique, Keio
+University). All Rights Reserved.
+http://www.w3.org/Consortium/Legal/


On 9/15/10 7:34 AM, rickmcguire@apache.org wrote:
> +This product includes software developed by
> +The Object Management Group.
> +
> +Copyright (c) 1999-2000 Object Management Group. Unlimited rights to
> +duplicate and use this code are hereby granted provided that this
> +copyright notice is included.
> +
> +This product includes software developed by
> +The W3C Consortium (http://www.w3.org/).
> +
> +Copyright © 1994-2002 World Wide Web Consortium, 
> +(Massachusetts Institute of Technology, Institut National 
> +de Recherche en Informatique et en Automatique, Keio 
> +University). All Rights Reserved. 
> +http://www.w3.org/Consortium/Legal/