You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by ga...@apache.org on 2009/10/06 22:23:32 UTC

svn commit: r822475 [1/2] - in /incubator/aries/trunk/jndi-contrib: ./ jndi-bundle/ jndi-bundle/src/ jndi-bundle/src/main/ jndi-bundle/src/main/java/ jndi-bundle/src/main/java/org/ jndi-bundle/src/main/java/org/apache/ jndi-bundle/src/main/java/org/apa...

Author: gawor
Date: Tue Oct  6 20:23:31 2009
New Revision: 822475

URL: http://svn.apache.org/viewvc?rev=822475&view=rev
Log:
Refactor IBM's JNDI donation into Aries with svn history - based on Guillaume's initial refactoring (ARIES-14)

Added:
    incubator/aries/trunk/jndi-contrib/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml   (with props)
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/
    incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java   (with props)
    incubator/aries/trunk/jndi-contrib/jndi-core/
    incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml   (with props)
    incubator/aries/trunk/jndi-contrib/jndi-core/src/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/   (props changed)
      - copied from r822445, incubator/aries/contrib/ibm/com.ibm.osgi.jndi/src/com/ibm/osgi/jndi/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/
    incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java   (contents, props changed)
      - copied, changed from r822445, incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/ObjectFactoryTest.java
    incubator/aries/trunk/jndi-contrib/jndi-url/
    incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml   (with props)
    incubator/aries/trunk/jndi-contrib/jndi-url/src/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/   (props changed)
      - copied from r822445, incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/src/com/ibm/osgi/jndi/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/   (props changed)
      - copied from r822445, incubator/aries/contrib/ibm/com.ibm.osgi.jndi.url/unittest/com/ibm/osgi/jndi/
    incubator/aries/trunk/jndi-contrib/pom.xml   (with props)
Modified:
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContext.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContextFactory.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiInitialContextFactoryBuilder.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiObjectFactoryBuilder.java
    incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiURLContextFactory.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryName.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryNameParser.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceHelperTest.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryContextTest.java
    incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceRegistryNameParserTest.java

Added: incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml?rev=822475&view=auto
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml (added)
+++ incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml Tue Oct  6 20:23:31 2009
@@ -0,0 +1,194 @@
+<!--
+    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.
+-->
+<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.aries.jndi</groupId>
+        <artifactId>jndi</artifactId>
+        <version>1.0.0-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>aries-jndi</artifactId>
+    <packaging>bundle</packaging>
+    <name>Apache Aries JNDI Bundle</name>
+    <description>
+        This bundle contains the core JNDI along with the OSGi url handler.
+        It's composed of the jndi-core and jndi-url modules.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>aries-jndi-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.jndi</groupId>
+            <artifactId>aries-jndi-url</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.groupId}</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.aries.jndi.priv.Activator</Bundle-Activator>
+                        <Import-Package>
+                            !org.apache.aries.jndi*,
+                            *
+                        </Import-Package>
+                        <Export-Package>
+                            org.osgi.service.jndi;version="${pom.version}",
+                            org.osgi.service.jndi.services;version="${pom.version}"
+                        </Export-Package>
+                        <Private-Package>
+                            org.apache.aries.jndi*
+                        </Private-Package>
+                        <!-- include the right NOTICE with attribution to the OSGi alliance -->
+                        <Include-Resource>{maven-resources},META-INF/NOTICE=../NOTICE</Include-Resource>
+                        <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+                        <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
+                        <_failok>true</_failok>
+                     </instructions>
+                    <unpackBundle>true</unpackBundle>
+                </configuration>
+            </plugin>
+            <!-- Use the shade plugin with the dependency plugin to unjar the three jars (api, core and cm)
+                 so that the associated sources and javadocs jars are complete.
+                 To build the main jar, the maven-bundle-plugin is used, that's why everything is exluded -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <includes>
+                                    <include>org.apache.aries.jndi:aries-jndi-core</include>
+                                    <include>org.apache.aries.jndi:aries-jndi-url</include>
+                                </includes>
+                            </artifactSet>
+                            <filters>
+                                <filter>
+                                    <artifact>org.apache.aries.jndi:aries-jndi-core</artifact>
+                                    <excludes>
+                                        <exclude>org/**</exclude>
+                                    </excludes>
+                                </filter>
+                                <filter>
+                                    <artifact>org.apache.aries.jndi:aries-jndi-url</artifact>
+                                    <excludes>
+                                        <exclude>org/**</exclude>
+                                    </excludes>
+                                </filter>
+                            </filters>
+                            <createSourcesJar>${createSourcesJar}</createSourcesJar>
+                            <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+                            <createDependencyReducedPom>true</createDependencyReducedPom>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>deploy</id>
+            <properties>
+                <createSourcesJar>true</createSourcesJar>
+            </properties>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-dependency-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>unpack-sources</id>
+                                <phase>generate-sources</phase>
+                                <goals>
+                                    <goal>unpack</goal>
+                                </goals>
+                                <configuration>
+                                    <artifactItems>
+                                        <artifactItem>
+                                            <groupId>org.apache.aries.jndi</groupId>
+                                            <artifactId>aries-jndi-core</artifactId>
+                                            <classifier>sources</classifier>
+                                        </artifactItem>
+                                        <artifactItem>
+                                            <groupId>org.apache.aries.jndi</groupId>
+                                            <artifactId>aries-jndi-url</artifactId>
+                                            <classifier>sources</classifier>
+                                        </artifactItem>
+                                    </artifactItems>
+                                    <outputDirectory>${project.build.directory}/sources</outputDirectory>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-source-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>attach-sources</id>
+                                <phase>process-classes</phase>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-javadoc-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>package</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>jar</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <minmemory>128m</minmemory>
+                            <maxmemory>512m</maxmemory>
+                            <sourcepath>${project.build.directory}/sources</sourcepath>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+</project>

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java?rev=822475&view=auto
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java (added)
+++ incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java Tue Oct  6 20:23:31 2009
@@ -0,0 +1,47 @@
+/**
+ * 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.aries.jndi.priv;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+    private BundleActivator[] activators;
+
+    public Activator() {
+        this.activators = new BundleActivator[]{
+                new org.apache.aries.jndi.startup.Activator(),
+                new org.apache.aries.jndi.url.Activator()
+        };
+    }
+
+    public void start(BundleContext bundleContext) throws Exception {
+        for (BundleActivator activator : activators) {
+            activator.start(bundleContext);
+        }
+    }
+
+    public void stop(BundleContext bundleContext) throws Exception {
+        for (BundleActivator activator : activators) {
+            activator.stop(bundleContext);
+        }
+    }
+
+}

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/jndi-contrib/jndi-bundle/src/main/java/org/apache/aries/jndi/priv/Activator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml?rev=822475&view=auto
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml (added)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml Tue Oct  6 20:23:31 2009
@@ -0,0 +1,64 @@
+<!--
+ 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.
+-->
+<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.aries.jndi</groupId>
+    <artifactId>jndi</artifactId>
+    <version>1.0.0-incubating-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>aries-jndi-core</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache Aries JNDI Core</name>
+  <description>
+      This bundle contains the core of JNDI support for OSGi.
+  </description>
+  
+  <dependencies>
+      <dependency>
+          <groupId>org.osgi</groupId>
+          <artifactId>org.osgi.core</artifactId>
+          <scope>provided</scope>
+      </dependency>
+  </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.groupId}.core</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.aries.jndi.startup.Activator</Bundle-Activator>
+                        <Export-Package>
+                            org.apache.aries.jndi;version="${pom.version}"
+                        </Export-Package>
+                        <Import-Package>!org.apache.aries.jndi*,*</Import-Package>
+                        <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+                        <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+  
+</project>

Propchange: incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/jndi-contrib/jndi-core/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/Constants.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 public class Constants {
   public static final String OSGI_JNDI_FILTER_NAME = "osgi.jndi.serviceName";

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/ContextHelper.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 import java.util.Hashtable;
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContext.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContext.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContext.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContext.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 import java.util.Hashtable;
 import java.util.concurrent.ConcurrentHashMap;

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContextFactory.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContextFactory.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/DelegateContextFactory.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 import java.util.Hashtable;
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiInitialContextFactoryBuilder.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiInitialContextFactoryBuilder.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiInitialContextFactoryBuilder.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiInitialContextFactoryBuilder.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 import java.util.Hashtable;
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiObjectFactoryBuilder.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiObjectFactoryBuilder.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiObjectFactoryBuilder.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/OSGiObjectFactoryBuilder.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi;
+package org.apache.aries.jndi;
 
 import java.util.Enumeration;
 import java.util.Hashtable;

Modified: incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/main/java/org/apache/aries/jndi/startup/Activator.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.startup;
+package org.apache.aries.jndi.startup;
 
 import javax.naming.NamingException;
 import javax.naming.spi.NamingManager;
@@ -24,9 +24,9 @@
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 
-import com.ibm.osgi.jndi.ContextHelper;
-import com.ibm.osgi.jndi.OSGiInitialContextFactoryBuilder;
-import com.ibm.osgi.jndi.OSGiObjectFactoryBuilder;
+import org.apache.aries.jndi.ContextHelper;
+import org.apache.aries.jndi.OSGiInitialContextFactoryBuilder;
+import org.apache.aries.jndi.OSGiObjectFactoryBuilder;
 
 /**
  * The activator for this bundle makes sure the static classes in it are

Copied: incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java (from r822445, incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/ObjectFactoryTest.java)
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java?p2=incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java&p1=incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/ObjectFactoryTest.java&r1=822445&r2=822475&rev=822475&view=diff
==============================================================================
--- incubator/aries/contrib/ibm/com.ibm.osgi.jndi/unittest/com/ibm/ws/eba/jndi/test/ObjectFactoryTest.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java Tue Oct  6 20:23:31 2009
@@ -1,171 +1,171 @@
-/*
- * 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 WARRANTIESOR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.ibm.ws.eba.jndi.test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import java.lang.reflect.Field;
-import java.util.Hashtable;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.Name;
-import javax.naming.Reference;
-import javax.naming.StringRefAddr;
-import javax.naming.spi.NamingManager;
-import javax.naming.spi.ObjectFactory;
-
-import mocks.BundleContextMock;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.BundleContext;
-
-import com.ibm.aries.unittest.mocks.MethodCall;
-import com.ibm.aries.unittest.mocks.Skeleton;
-import com.ibm.osgi.jndi.ContextHelper;
-import com.ibm.osgi.jndi.OSGiObjectFactoryBuilder;
-import com.ibm.osgi.jndi.startup.Activator;
-
-public class ObjectFactoryTest
-{
-  private BundleContext bc;
-
-  /**
-   * This method does the setup .
-   * @throws NoSuchFieldException 
-   * @throws SecurityException 
-   * @throws IllegalAccessException 
-   * @throws IllegalArgumentException 
-   */
-  @Before
-  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
-  {
-    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
-    new Activator().start(bc);
-    
-    Field f = ContextHelper.class.getDeclaredField("context");
-    f.setAccessible(true);
-    f.set(null, bc);
-    f = OSGiObjectFactoryBuilder.class.getDeclaredField("context");
-    f.setAccessible(true);
-    f.set(null, bc);
-
-  }
-
-  /**
-   * Make sure we clear the caches out before the next test.
-   */
-  @After
-  public void teardown()
-  {
-    new Activator().stop(bc);
-    BundleContextMock.clear();
-  }
-
-  @Test
-  public void testURLReferenceWithNoMatchingHandler() throws Exception
-  {
-    Reference ref = new Reference(null);
-    ref.add(new StringRefAddr("URL", "wibble"));
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-
-    assertSame("The naming manager should have returned the reference object", ref, obj);
-  }
-
-  @Test
-  public void testURLReferenceWithMatchingHandler() throws Exception
-  {
-    String testObject = "Test object";
-    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
-    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
-
-    Properties props = new Properties();
-    props.setProperty("osgi.jndi.urlScheme", "wibble");
-
-    bc.registerService(ObjectFactory.class.getName(), factory, props);
-
-    Reference ref = new Reference(null);
-    ref.add(new StringRefAddr("URL", "wibble"));
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-    
-    assertEquals("The naming manager should have returned the test object", testObject, obj);
-  }
-
-  @Test
-  public void testReferenceWithNoClassName() throws Exception
-  {
-    String testObject = "Test object";
-    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
-    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
-
-    bc.registerService(ObjectFactory.class.getName(), factory, null);
-
-    Reference ref = new Reference(null);
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-    
-    assertEquals("The naming manager should have returned the test object", testObject, obj);
-  }
-
-  @Test
-  public void testSpecifiedFactoryWithMatchingFactory() throws Exception
-  {
-    String testObject = "Test object";
-    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
-    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
-
-    Reference ref = new Reference("dummy.class.name", factory.getClass().getName(), "");
-
-    bc.registerService(new String[] {ObjectFactory.class.getName(), factory.getClass().getName()}, 
-                       factory, null);
-
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-    
-    assertEquals("The naming manager should have returned the test object", testObject, obj);
-  }
-
-  @Test
-  public void testSpecifiedFactoryWithRegisteredButNotMatchingFactory() throws Exception
-  {
-    String testObject = "Test object";
-    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
-    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
-
-    Reference ref = new Reference("dummy.class.name", "dummy.factory.class.name", "");
-
-    bc.registerService(new String[] {ObjectFactory.class.getName(), factory.getClass().getName()}, 
-                       factory, null);
-
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-
-    assertSame("The naming manager should have returned the reference object", ref, obj);
-  }
-
-  @Test
-  public void testSpecifiedFactoryWithNoMatchingFactory() throws Exception
-  {
-    Reference ref = new Reference("dummy.class.name");
-
-    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
-
-    assertSame("The naming manager should have returned the reference object", ref, obj);
-  }
-}
\ No newline at end of file
+///*
+// * 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 WARRANTIESOR 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.aries.jndi;
+//
+//import static org.junit.Assert.assertEquals;
+//import static org.junit.Assert.assertSame;
+//
+//import java.lang.reflect.Field;
+//import java.util.Hashtable;
+//import java.util.Properties;
+//
+//import javax.naming.Context;
+//import javax.naming.Name;
+//import javax.naming.Reference;
+//import javax.naming.StringRefAddr;
+//import javax.naming.spi.NamingManager;
+//import javax.naming.spi.ObjectFactory;
+//
+//import mocks.BundleContextMock;
+//
+//import org.junit.After;
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.osgi.framework.BundleContext;
+//
+//import com.ibm.aries.unittest.mocks.MethodCall;
+//import com.ibm.aries.unittest.mocks.Skeleton;
+//import org.apache.aries.jndi.ContextHelper;
+//import org.apache.aries.jndi.OSGiObjectFactoryBuilder;
+//import org.apache.aries.jndi.startup.Activator;
+//
+//public class ObjectFactoryTest
+//{
+//  private BundleContext bc;
+//
+//  /**
+//   * This method does the setup .
+//   * @throws NoSuchFieldException 
+//   * @throws SecurityException 
+//   * @throws IllegalAccessException 
+//   * @throws IllegalArgumentException 
+//   */
+//  @Before
+//  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
+//  {
+//    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
+//    new Activator().start(bc);
+//    
+//    Field f = ContextHelper.class.getDeclaredField("context");
+//    f.setAccessible(true);
+//    f.set(null, bc);
+//    f = OSGiObjectFactoryBuilder.class.getDeclaredField("context");
+//    f.setAccessible(true);
+//    f.set(null, bc);
+//
+//  }
+//
+//  /**
+//   * Make sure we clear the caches out before the next test.
+//   */
+//  @After
+//  public void teardown()
+//  {
+//    new Activator().stop(bc);
+//    BundleContextMock.clear();
+//  }
+//
+//  @Test
+//  public void testURLReferenceWithNoMatchingHandler() throws Exception
+//  {
+//    Reference ref = new Reference(null);
+//    ref.add(new StringRefAddr("URL", "wibble"));
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//
+//    assertSame("The naming manager should have returned the reference object", ref, obj);
+//  }
+//
+//  @Test
+//  public void testURLReferenceWithMatchingHandler() throws Exception
+//  {
+//    String testObject = "Test object";
+//    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
+//    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
+//
+//    Properties props = new Properties();
+//    props.setProperty("osgi.jndi.urlScheme", "wibble");
+//
+//    bc.registerService(ObjectFactory.class.getName(), factory, props);
+//
+//    Reference ref = new Reference(null);
+//    ref.add(new StringRefAddr("URL", "wibble"));
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//    
+//    assertEquals("The naming manager should have returned the test object", testObject, obj);
+//  }
+//
+//  @Test
+//  public void testReferenceWithNoClassName() throws Exception
+//  {
+//    String testObject = "Test object";
+//    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
+//    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
+//
+//    bc.registerService(ObjectFactory.class.getName(), factory, null);
+//
+//    Reference ref = new Reference(null);
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//    
+//    assertEquals("The naming manager should have returned the test object", testObject, obj);
+//  }
+//
+//  @Test
+//  public void testSpecifiedFactoryWithMatchingFactory() throws Exception
+//  {
+//    String testObject = "Test object";
+//    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
+//    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
+//
+//    Reference ref = new Reference("dummy.class.name", factory.getClass().getName(), "");
+//
+//    bc.registerService(new String[] {ObjectFactory.class.getName(), factory.getClass().getName()}, 
+//                       factory, null);
+//
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//    
+//    assertEquals("The naming manager should have returned the test object", testObject, obj);
+//  }
+//
+//  @Test
+//  public void testSpecifiedFactoryWithRegisteredButNotMatchingFactory() throws Exception
+//  {
+//    String testObject = "Test object";
+//    ObjectFactory factory = Skeleton.newMock(ObjectFactory.class);
+//    Skeleton.getSkeleton(factory).setReturnValue(new MethodCall(ObjectFactory.class, "getObjectInstance", Object.class, Name.class, Context.class, Hashtable.class), testObject);
+//
+//    Reference ref = new Reference("dummy.class.name", "dummy.factory.class.name", "");
+//
+//    bc.registerService(new String[] {ObjectFactory.class.getName(), factory.getClass().getName()}, 
+//                       factory, null);
+//
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//
+//    assertSame("The naming manager should have returned the reference object", ref, obj);
+//  }
+//
+//  @Test
+//  public void testSpecifiedFactoryWithNoMatchingFactory() throws Exception
+//  {
+//    Reference ref = new Reference("dummy.class.name");
+//
+//    Object obj = NamingManager.getObjectInstance(ref, null, null, null);
+//
+//    assertSame("The naming manager should have returned the reference object", ref, obj);
+//  }
+//}
\ No newline at end of file

Propchange: incubator/aries/trunk/jndi-contrib/jndi-core/src/test/java/org/apache/aries/jndi/ObjectFactoryTest.java
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml?rev=822475&view=auto
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml (added)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml Tue Oct  6 20:23:31 2009
@@ -0,0 +1,69 @@
+<!--
+ 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.
+-->
+<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.aries.jndi</groupId>
+    <artifactId>jndi</artifactId>
+    <version>1.0.0-incubating-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>aries-jndi-url</artifactId>
+  <packaging>bundle</packaging>
+  <name>Apache Aries JNDI URL Handler</name>
+  <description>
+      This bundle contains the JNDI URL handler for OSGi
+  </description>
+  
+  <dependencies>
+      <dependency>
+          <groupId>org.osgi</groupId>
+          <artifactId>org.osgi.core</artifactId>
+          <scope>provided</scope>
+      </dependency>
+      <dependency>
+          <groupId>org.apache.aries.jndi</groupId>
+          <artifactId>aries-jndi-core</artifactId>
+          <scope>test</scope>
+      </dependency>
+  </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.groupId}.url</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.aries.jndi.url.Activator</Bundle-Activator>
+                        <Export-Package>
+                            org.apache.aries.jndi.services;version="${pom.version}"
+                        </Export-Package>
+                        <Import-Package>!org.apache.aries.jndi*,*</Import-Package>
+                        <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
+                        <_removeheaders>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</_removeheaders>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+  
+</project>

Propchange: incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/jndi-contrib/jndi-url/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Propchange: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/services/ServiceHelper.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.services;
+package org.apache.aries.jndi.services;
 
 import java.util.HashSet;
 import java.util.LinkedList;

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/Activator.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.url;
+package org.apache.aries.jndi.url;
 
 import java.util.Hashtable;
 
@@ -26,7 +26,7 @@
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceRegistration;
 
-import com.ibm.osgi.jndi.services.ServiceHelper;
+import org.apache.aries.jndi.services.ServiceHelper;
 
 public class Activator implements BundleActivator {
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiURLContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiURLContextFactory.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiURLContextFactory.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/OsgiURLContextFactory.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.url;
+package org.apache.aries.jndi.url;
 
 import java.util.Hashtable;
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryContext.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.url;
+package org.apache.aries.jndi.url;
 
 import java.util.HashMap;
 import java.util.Hashtable;
@@ -34,7 +34,7 @@
 import javax.naming.NamingException;
 import javax.naming.OperationNotSupportedException;
 
-import com.ibm.osgi.jndi.services.ServiceHelper;
+import org.apache.aries.jndi.services.ServiceHelper;
 
 /**
  * A JNDI context for looking stuff up from the service registry.

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryName.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryName.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryName.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryName.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.url;
+package org.apache.aries.jndi.url;
 
 import java.util.Enumeration;
 

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryNameParser.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryNameParser.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryNameParser.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/main/java/org/apache/aries/jndi/url/ServiceRegistryNameParser.java Tue Oct  6 20:23:31 2009
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package com.ibm.osgi.jndi.url;
+package org.apache.aries.jndi.url;
 
 import javax.naming.InvalidNameException;
 import javax.naming.Name;

Propchange: incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceHelperTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceHelperTest.java?rev=822475&r1=822445&r2=822475&view=diff
==============================================================================
--- incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceHelperTest.java (original)
+++ incubator/aries/trunk/jndi-contrib/jndi-url/src/test/java/org/apache/aries/jndi/url/ServiceHelperTest.java Tue Oct  6 20:23:31 2009
@@ -1,210 +1,210 @@
-/*
- * 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 WARRANTIESOR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package com.ibm.osgi.jndi.url;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.reflect.Field;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Properties;
-
-import mocks.BundleContextMock;
-import mocks.BundleMock;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceFactory;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
-
-import com.ibm.aries.unittest.mocks.MethodCall;
-import com.ibm.aries.unittest.mocks.Skeleton;
-import com.ibm.osgi.jndi.services.ServiceHelper;
-import com.ibm.osgi.jndi.url.Activator;
-
-
-/**
- * This class contains tests for the ServiceHelper
- */
-public class ServiceHelperTest
-{
-  /** The service we register by default */
-  private Thread service;
-  /** The bundle context for the test */
-  private BundleContext bc;
-  
-  /**
-   * This method does the setup to ensure we always have a service.
-   * @throws NoSuchFieldException 
-   * @throws SecurityException 
-   * @throws IllegalAccessException 
-   * @throws IllegalArgumentException 
-   */
-  @Before
-  public void registerService() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
-  {
-    
-    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
-    new Activator().start(bc);
-    
-    Field f = ServiceHelper.class.getDeclaredField("context");
-    f.setAccessible(true);
-    f.set(null, bc);
-
-    service = new Thread();
-    
-    registerService(service);
-  }
-
-  /**
-   * Register a service in our map.
-   * 
-   * @param service2 The service to register.
-   */
-  private void registerService(Thread service2)
-  {
-    ServiceFactory factory = Skeleton.newMock(ServiceFactory.class);
-    Skeleton skel = Skeleton.getSkeleton(factory);
-    
-    skel.setReturnValue(new MethodCall(ServiceFactory.class, "getService", Bundle.class, ServiceRegistration.class), service2);
-    
-    bc.registerService(new String[] {"java.lang.Runnable"}, factory, new Hashtable<String, String>());
-  }
-  
-  /**
-   * Make sure we clear the caches out before the next test.
-   */
-  @After
-  public void teardown()
-  {
-    BundleContextMock.clear();
-  }
-  
-  /**
-   * Check that the basic behaviour is correct. Do we call ungetService, do
-   * we call getService the right number of times.
-   */
-  @Test
-  public void getAService()
-  {
-    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
-    
-    Skeleton skel = Skeleton.getSkeleton(b);
-    
-    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
-    
-    skel = Skeleton.getSkeleton(b.getBundleContext());
-
-    Object retrievedService = ServiceHelper.getService("java.lang.Runnable", null);
-    
-    assertNotNull("We could not locate the service in the registry", retrievedService);
-    
-    assertTrue("We didn't get back the service we expected", service == retrievedService);
-    
-    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
-    MethodCall ungetService = new MethodCall(BundleContext.class, "ungetService", ServiceReference.class);
-    
-    skel.assertNotCalled(ungetService);
-    skel.assertCalledExactNumberOfTimes(getService, 1);
-
-    Object retrievedService2 = ServiceHelper.getService("java.lang.Runnable", null);
-
-    assertTrue("We got different objects, which we did not want", retrievedService == retrievedService2);
-    skel.assertCalledExactNumberOfTimes(getService, 2);
-    skel.assertCalledExactNumberOfTimes(ungetService, 1);
-  }
-  
-  /**
-   * This method checks that we get two different services from different
-   * bundles if the thread context classloader is different.
-   */
-  @Test
-  public void getAServiceFromTwoDifferentApplications()
-  {
-    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
-    
-    Skeleton skel = Skeleton.getSkeleton(b);
-    
-    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
-    
-    Object retrievedService = ServiceHelper.getService("java.lang.Runnable", null);
-    Bundle b2 = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
-    
-    skel = Skeleton.getSkeleton(b2);
-    
-    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
-    Object retrievedService2 = ServiceHelper.getService("java.lang.Runnable", null);
-    
-    assertNotNull("We could not locate the service in the registry", retrievedService);
-    assertNotNull("We could not locate the service in the registry", retrievedService2);
-    
-    assertTrue("We got different objects, which we did not want", retrievedService == retrievedService2);
-    
-    assertFalse("We expected different bundles from our calls to the BundleMaker, but we got the same one", b == b2);
-    
-    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
-    Skeleton.getSkeleton(b.getBundleContext()).assertCalledExactNumberOfTimes(getService, 1);
-    Skeleton.getSkeleton(b2.getBundleContext()).assertCalledExactNumberOfTimes(getService, 1);
-  }
-  
-  /**
-   * This test checks that the getServices method returns the expected number of
-   * services, and that it changes when new services are registered.
-   */
-  @Test
-  public void getMultipleServices()
-  {
-    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
-    
-    Skeleton skel = Skeleton.getSkeleton(b);
-    
-    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
-    
-    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
-    MethodCall ungetService = new MethodCall(BundleContext.class, "ungetService", ServiceReference.class);
-    
-    List<?> services = ServiceHelper.getServices("java.lang.Runnable", null);
-
-    skel = Skeleton.getSkeleton(b.getBundleContext());
-
-    skel.assertNotCalled(ungetService);
-    skel.assertCalledExactNumberOfTimes(getService, 1);
-
-    assertEquals("At this point we really should only have one service.", 1, services.size());
-    Thread anotherService = new Thread();
-    registerService(anotherService);
-    
-    services = ServiceHelper.getServices("java.lang.Runnable", null);
-    
-    assertEquals("At this point we really should have two services.", 2, services.size());
-    assertTrue("The master service was not there, odd.", services.contains(service));
-    assertTrue("The service we added just for this test was not there, odd.", services.contains(anotherService));
-    
-    // this should be 3 times, once for the first call to getServices, and twice for the second
-    skel.assertCalledExactNumberOfTimes(getService, 3);
-    skel.assertCalledExactNumberOfTimes(ungetService, 1);
-  }
-}
\ No newline at end of file
+///*
+// * 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 WARRANTIESOR 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.aries.jndi.url;
+//
+//import static org.junit.Assert.assertEquals;
+//import static org.junit.Assert.assertFalse;
+//import static org.junit.Assert.assertNotNull;
+//import static org.junit.Assert.assertTrue;
+//
+//import java.lang.reflect.Field;
+//import java.util.Hashtable;
+//import java.util.List;
+//import java.util.Properties;
+//
+//import mocks.BundleContextMock;
+//import mocks.BundleMock;
+//
+//import org.junit.After;
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.osgi.framework.Bundle;
+//import org.osgi.framework.BundleContext;
+//import org.osgi.framework.ServiceFactory;
+//import org.osgi.framework.ServiceReference;
+//import org.osgi.framework.ServiceRegistration;
+//
+//import com.ibm.aries.unittest.mocks.MethodCall;
+//import com.ibm.aries.unittest.mocks.Skeleton;
+//import org.apache.aries.jndi.services.ServiceHelper;
+//import org.apache.aries.jndi.url.Activator;
+//
+//
+///**
+// * This class contains tests for the ServiceHelper
+// */
+//public class ServiceHelperTest
+//{
+//  /** The service we register by default */
+//  private Thread service;
+//  /** The bundle context for the test */
+//  private BundleContext bc;
+//  
+//  /**
+//   * This method does the setup to ensure we always have a service.
+//   * @throws NoSuchFieldException 
+//   * @throws SecurityException 
+//   * @throws IllegalAccessException 
+//   * @throws IllegalArgumentException 
+//   */
+//  @Before
+//  public void registerService() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
+//  {
+//    
+//    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
+//    new Activator().start(bc);
+//    
+//    Field f = ServiceHelper.class.getDeclaredField("context");
+//    f.setAccessible(true);
+//    f.set(null, bc);
+//
+//    service = new Thread();
+//    
+//    registerService(service);
+//  }
+//
+//  /**
+//   * Register a service in our map.
+//   * 
+//   * @param service2 The service to register.
+//   */
+//  private void registerService(Thread service2)
+//  {
+//    ServiceFactory factory = Skeleton.newMock(ServiceFactory.class);
+//    Skeleton skel = Skeleton.getSkeleton(factory);
+//    
+//    skel.setReturnValue(new MethodCall(ServiceFactory.class, "getService", Bundle.class, ServiceRegistration.class), service2);
+//    
+//    bc.registerService(new String[] {"java.lang.Runnable"}, factory, new Hashtable<String, String>());
+//  }
+//  
+//  /**
+//   * Make sure we clear the caches out before the next test.
+//   */
+//  @After
+//  public void teardown()
+//  {
+//    BundleContextMock.clear();
+//  }
+//  
+//  /**
+//   * Check that the basic behaviour is correct. Do we call ungetService, do
+//   * we call getService the right number of times.
+//   */
+//  @Test
+//  public void getAService()
+//  {
+//    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
+//    
+//    Skeleton skel = Skeleton.getSkeleton(b);
+//    
+//    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
+//    
+//    skel = Skeleton.getSkeleton(b.getBundleContext());
+//
+//    Object retrievedService = ServiceHelper.getService("java.lang.Runnable", null);
+//    
+//    assertNotNull("We could not locate the service in the registry", retrievedService);
+//    
+//    assertTrue("We didn't get back the service we expected", service == retrievedService);
+//    
+//    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
+//    MethodCall ungetService = new MethodCall(BundleContext.class, "ungetService", ServiceReference.class);
+//    
+//    skel.assertNotCalled(ungetService);
+//    skel.assertCalledExactNumberOfTimes(getService, 1);
+//
+//    Object retrievedService2 = ServiceHelper.getService("java.lang.Runnable", null);
+//
+//    assertTrue("We got different objects, which we did not want", retrievedService == retrievedService2);
+//    skel.assertCalledExactNumberOfTimes(getService, 2);
+//    skel.assertCalledExactNumberOfTimes(ungetService, 1);
+//  }
+//  
+//  /**
+//   * This method checks that we get two different services from different
+//   * bundles if the thread context classloader is different.
+//   */
+//  @Test
+//  public void getAServiceFromTwoDifferentApplications()
+//  {
+//    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
+//    
+//    Skeleton skel = Skeleton.getSkeleton(b);
+//    
+//    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
+//    
+//    Object retrievedService = ServiceHelper.getService("java.lang.Runnable", null);
+//    Bundle b2 = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
+//    
+//    skel = Skeleton.getSkeleton(b2);
+//    
+//    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
+//    Object retrievedService2 = ServiceHelper.getService("java.lang.Runnable", null);
+//    
+//    assertNotNull("We could not locate the service in the registry", retrievedService);
+//    assertNotNull("We could not locate the service in the registry", retrievedService2);
+//    
+//    assertTrue("We got different objects, which we did not want", retrievedService == retrievedService2);
+//    
+//    assertFalse("We expected different bundles from our calls to the BundleMaker, but we got the same one", b == b2);
+//    
+//    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
+//    Skeleton.getSkeleton(b.getBundleContext()).assertCalledExactNumberOfTimes(getService, 1);
+//    Skeleton.getSkeleton(b2.getBundleContext()).assertCalledExactNumberOfTimes(getService, 1);
+//  }
+//  
+//  /**
+//   * This test checks that the getServices method returns the expected number of
+//   * services, and that it changes when new services are registered.
+//   */
+//  @Test
+//  public void getMultipleServices()
+//  {
+//    Bundle b = Skeleton.newMock(new BundleMock("scooby.doo", new Properties()), Bundle.class);
+//    
+//    Skeleton skel = Skeleton.getSkeleton(b);
+//    
+//    Thread.currentThread().setContextClassLoader(((BundleMock)skel.getTemplateObject()).getClassLoader());
+//    
+//    MethodCall getService = new MethodCall(BundleContext.class, "getService", ServiceReference.class);
+//    MethodCall ungetService = new MethodCall(BundleContext.class, "ungetService", ServiceReference.class);
+//    
+//    List<?> services = ServiceHelper.getServices("java.lang.Runnable", null);
+//
+//    skel = Skeleton.getSkeleton(b.getBundleContext());
+//
+//    skel.assertNotCalled(ungetService);
+//    skel.assertCalledExactNumberOfTimes(getService, 1);
+//
+//    assertEquals("At this point we really should only have one service.", 1, services.size());
+//    Thread anotherService = new Thread();
+//    registerService(anotherService);
+//    
+//    services = ServiceHelper.getServices("java.lang.Runnable", null);
+//    
+//    assertEquals("At this point we really should have two services.", 2, services.size());
+//    assertTrue("The master service was not there, odd.", services.contains(service));
+//    assertTrue("The service we added just for this test was not there, odd.", services.contains(anotherService));
+//    
+//    // this should be 3 times, once for the first call to getServices, and twice for the second
+//    skel.assertCalledExactNumberOfTimes(getService, 3);
+//    skel.assertCalledExactNumberOfTimes(ungetService, 1);
+//  }
+//}
\ No newline at end of file