Author: davidb
Date: Sat Apr 9 23:03:08 2011
New Revision: 1090702
URL: http://svn.apache.org/viewvc?rev=1090702&view=rev
Log:
Furter work re the refactoring of SPI-Fly.
Additional tests passing.
Added:
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/UnaffectedTestClient.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/AltSPIImpl1.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl2.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl3.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/AltSPIImpl2.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/MySPIImpl4.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.AltSPI
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.MySPI
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.AltSPI
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.MySPI
Modified:
aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/main/java/org/apache/aries/spifly/dynamic/DynamicWeavingActivator.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl1/META-INF/services/org.apache.aries.mytest.MySPI
Modified: aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java?rev=1090702&r1=1090701&r2=1090702&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java (original)
+++ aries/trunk/spi-fly/spi-fly-core/src/main/java/org/apache/aries/spifly/Util.java Sat Apr
9 23:03:08 2011
@@ -98,13 +98,9 @@ public class Util {
case 1:
Bundle bundle = bundles.iterator().next();
return getBundleClassLoader(bundle);
-// BundleWiring wiring = bundle.adapt(BundleWiring.class);
-// return wiring.getClassLoader();
default:
List<ClassLoader> loaders = new ArrayList<ClassLoader>();
for (Bundle b : bundles) {
-// BundleWiring bw = b.adapt(BundleWiring.class);
-// loaders.add(bw.getClassLoader());
loaders.add(getBundleClassLoader(b));
}
return new MultiDelegationClassloader(loaders.toArray(new ClassLoader[loaders.size()]));
@@ -113,8 +109,9 @@ public class Util {
@SuppressWarnings("unchecked")
private static ClassLoader getBundleClassLoader(Bundle b) {
- // In 4.3 this can be done much easier by using the BundleWiring...
- // but here we're just finding any class in the bundle, load that and then use its
classloader.
+ // In 4.3 this can be done much easier by using the BundleWiring, but we want this
code to
+ // be 4.2 compliant.
+ // Here we're just finding any class in the bundle, load that and then use its classloader.
Enumeration<String> paths = b.getEntryPaths("/");
while(paths.hasMoreElements()) {
String path = paths.nextElement();
Modified: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/main/java/org/apache/aries/spifly/dynamic/DynamicWeavingActivator.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/main/java/org/apache/aries/spifly/dynamic/DynamicWeavingActivator.java?rev=1090702&r1=1090701&r2=1090702&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/main/java/org/apache/aries/spifly/dynamic/DynamicWeavingActivator.java
(original)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/main/java/org/apache/aries/spifly/dynamic/DynamicWeavingActivator.java
Sat Apr 9 23:03:08 2011
@@ -26,20 +26,21 @@ import org.osgi.framework.ServiceRegistr
import org.osgi.framework.hooks.weaving.WeavingHook;
public class DynamicWeavingActivator extends BaseActivator implements BundleActivator {
+ @SuppressWarnings("rawtypes")
private ServiceRegistration weavingHookService;
@Override
public synchronized void start(BundleContext context) throws Exception {
WeavingHook wh = new ClientWeavingHook(context, this);
weavingHookService = context.registerService(WeavingHook.class.getName(), wh, null);
-
+
super.start(context, SpiFlyConstants.SPI_CONSUMER_HEADER);
}
@Override
public synchronized void stop(BundleContext context) throws Exception {
weavingHookService.unregister();
-
+
super.stop(context);
}
}
Modified: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java?rev=1090702&r1=1090701&r2=1090702&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
(original)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/ClientWeavingHookTest.java
Sat Apr 9 23:03:08 2011
@@ -35,6 +35,8 @@ import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import org.apache.aries.spifly.BaseActivator;
import org.apache.aries.spifly.Streams;
@@ -118,7 +120,7 @@ public class ClientWeavingHookTest {
// Weave the TestClient class.
URL clsUrl = getClass().getResource("UnaffectedTestClient.class");
Assert.assertNotNull("Precondition", clsUrl);
- WovenClass wc = new MyWovenClass(clsUrl, "org.apache.aries.spifly.UnaffectedTestClient",
consumerBundle);
+ WovenClass wc = new MyWovenClass(clsUrl, "org.apache.aries.spifly.dynamic.UnaffectedTestClient",
consumerBundle);
Assert.assertEquals("Precondition", 0, wc.getDynamicImports().size());
wh.weave(wc);
@@ -143,13 +145,15 @@ public class ClientWeavingHookTest {
Dictionary<String, String> headers = new Hashtable<String, String>();
headers.put(SpiFlyConstants.SPI_CONSUMER_HEADER, "*");
+
Bundle consumerBundle = mockConsumerBundle(headers, spiFlyBundle);
+ activator.addWeavingData(consumerBundle, SpiFlyConstants.SPI_CONSUMER_HEADER);
WeavingHook wh = new ClientWeavingHook(spiFlyBundle.getBundleContext(), activator);
// Weave the TestClient class.
URL clsUrl = getClass().getResource("TestClient.class");
- WovenClass wc = new MyWovenClass(clsUrl, "org.apache.aries.spifly.TestClient", consumerBundle);
+ WovenClass wc = new MyWovenClass(clsUrl, "org.apache.aries.spifly.dynamic.TestClient",
consumerBundle);
wh.weave(wc);
Bundle providerBundle1 = mockProviderBundle("impl1", 1);
@@ -541,19 +545,13 @@ public class ClientWeavingHookTest {
// Set up the classloader that will be used by the ASM-generated code as the TCCL.
// It can load a META-INF/services file
- final ClassLoader cl = new TestImplClassLoader(subdir, resources.toArray(new String
[] {}));
-
- // The BundleWiring API is used on the bundle by the generated code to obtain its
classloader
- BundleWiring bw = EasyMock.createMock(BundleWiring.class);
- EasyMock.expect(bw.getClassLoader()).andReturn(cl).anyTimes();
- EasyMock.replay(bw);
+ final ClassLoader cl = new TestProviderBundleClassLoader(subdir, resources.toArray(new
String [] {}));
List<String> classResources = new ArrayList<String>();
for(String className : classNames) {
classResources.add("/" + className.replace('.', '/') + ".class");
}
Bundle providerBundle = EasyMock.createMock(Bundle.class);
- EasyMock.expect(providerBundle.adapt(BundleWiring.class)).andReturn(bw).anyTimes();
String bsn = subdir;
int idx = bsn.indexOf('_');
if (idx > 0) {
@@ -621,18 +619,60 @@ public class ClientWeavingHookTest {
return systemBundle;
}
- public static class TestImplClassLoader extends URLClassLoader {
+ // A classloader that loads anything starting with org.apache.aries.spifly.dynamic.impl1
from it
+ // and the rest from the parent. This is to mimic a bundle that holds a specific SPI
implementation.
+ public static class TestProviderBundleClassLoader extends URLClassLoader {
private final List<String> resources;
private final String prefix;
+ private final String classPrefix;
+ private final Map<String, Class<?>> loadedClasses = new ConcurrentHashMap<String,
Class<?>>();
- public TestImplClassLoader(String subdir, String ... resources) {
- super(new URL [] {}, TestImplClassLoader.class.getClassLoader());
+ public TestProviderBundleClassLoader(String subdir, String ... resources) {
+ super(new URL [] {}, TestProviderBundleClassLoader.class.getClassLoader());
- this.prefix = TestImplClassLoader.class.getPackage().getName().replace('.', '/')
+ "/" + subdir + "/";
+ this.prefix = TestProviderBundleClassLoader.class.getPackage().getName().replace('.',
'/') + "/" + subdir + "/";
+ this.classPrefix = prefix.replace('/', '.');
this.resources = Arrays.asList(resources);
}
@Override
+ public Class<?> loadClass(String name) throws ClassNotFoundException {
+ if (name.startsWith(classPrefix))
+ return loadClassLocal(name);
+
+ return super.loadClass(name);
+ }
+
+ @Override
+ protected synchronized Class<?> loadClass(String name, boolean resolve) throws
ClassNotFoundException {
+ if (name.startsWith(classPrefix)) {
+ Class<?> cls = loadClassLocal(name);
+ if (resolve)
+ resolveClass(cls);
+
+ return cls;
+ }
+
+ return super.loadClass(name, resolve);
+ }
+
+ protected Class<?> loadClassLocal(String name) throws ClassNotFoundException
{
+ Class<?> prevLoaded = loadedClasses.get(name);
+ if (prevLoaded != null)
+ return prevLoaded;
+
+ URL res = TestProviderBundleClassLoader.class.getClassLoader().getResource(name.replace('.',
'/') + ".class");
+ try {
+ byte[] bytes = Streams.suck(res.openStream());
+ Class<?> cls = defineClass(name, bytes, 0, bytes.length);
+ loadedClasses.put(name, cls);
+ return cls;
+ } catch (Exception e) {
+ throw new ClassNotFoundException(name, e);
+ }
+ }
+
+ @Override
public URL findResource(String name) {
if (resources.contains(name)) {
return getClass().getClassLoader().getResource(prefix + name);
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/UnaffectedTestClient.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/UnaffectedTestClient.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/UnaffectedTestClient.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/UnaffectedTestClient.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,36 @@
+/**
+ * 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.spifly.dynamic;
+
+import java.util.ServiceLoader;
+
+import org.apache.aries.mytest.MySPI;
+
+public class UnaffectedTestClient {
+ public String test(String input) {
+ StringBuilder sb = new StringBuilder();
+
+ ServiceLoader<MySPI> loader = ServiceLoader.load(MySPI.class,
+ new ClientWeavingHookTest.TestProviderBundleClassLoader("impl4", "META-INF/services/org.apache.aries.mytest.MySPI"));
+ for (MySPI mySPI : loader) {
+ sb.append(mySPI.someMethod(input));
+ }
+ return sb.toString();
+ }
+}
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/AltSPIImpl1.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/AltSPIImpl1.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/AltSPIImpl1.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/AltSPIImpl1.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.spifly.dynamic.impl2;
+
+import org.apache.aries.mytest.AltSPI;
+
+public class AltSPIImpl1 implements AltSPI {
+ @Override
+ public long square(long l) {
+ return l * l;
+ }
+}
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl2.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl2.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl2.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl2.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.spifly.dynamic.impl2;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl2 implements MySPI{
+ @Override
+ public String someMethod(String s) {
+ return s.toUpperCase();
+ }
+}
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl3.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl3.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl3.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl2/MySPIImpl3.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.spifly.dynamic.impl2;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl3 implements MySPI{
+ @Override
+ public String someMethod(String s) {
+ return "" + s.length();
+ }
+}
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/AltSPIImpl2.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/AltSPIImpl2.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/AltSPIImpl2.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/AltSPIImpl2.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.spifly.dynamic.impl4;
+
+import org.apache.aries.mytest.AltSPI;
+
+public class AltSPIImpl2 implements AltSPI {
+ @Override
+ public long square(long l) {
+ return -l * l;
+ }
+}
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/MySPIImpl4.java
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/MySPIImpl4.java?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/MySPIImpl4.java
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/java/org/apache/aries/spifly/dynamic/impl4/MySPIImpl4.java
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,28 @@
+/**
+ * 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.spifly.dynamic.impl4;
+
+import org.apache.aries.mytest.MySPI;
+
+public class MySPIImpl4 implements MySPI {
+ @Override
+ public String someMethod(String s) {
+ return "impl4";
+ }
+}
Modified: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl1/META-INF/services/org.apache.aries.mytest.MySPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl1/META-INF/services/org.apache.aries.mytest.MySPI?rev=1090702&r1=1090701&r2=1090702&view=diff
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl1/META-INF/services/org.apache.aries.mytest.MySPI
(original)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl1/META-INF/services/org.apache.aries.mytest.MySPI
Sat Apr 9 23:03:08 2011
@@ -1 +1 @@
-org.apache.aries.spifly.impl1.MySPIImpl1
+ org.apache.aries.spifly.dynamic.impl1.MySPIImpl1
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.AltSPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.AltSPI?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.AltSPI
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.AltSPI
Sat Apr 9 23:03:08 2011
@@ -0,0 +1 @@
+org.apache.aries.spifly.dynamic.impl2.AltSPIImpl1
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.MySPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.MySPI?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.MySPI
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl2/META-INF/services/org.apache.aries.mytest.MySPI
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,2 @@
+org.apache.aries.spifly.dynamic.impl2.MySPIImpl2
+org.apache.aries.spifly.dynamic.impl2.MySPIImpl3
\ No newline at end of file
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.AltSPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.AltSPI?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.AltSPI
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.AltSPI
Sat Apr 9 23:03:08 2011
@@ -0,0 +1 @@
+org.apache.aries.spifly.dynamic.impl4.AltSPIImpl2
Added: aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.MySPI
URL: http://svn.apache.org/viewvc/aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.MySPI?rev=1090702&view=auto
==============================================================================
--- aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.MySPI
(added)
+++ aries/trunk/spi-fly/spi-fly-dynamic-bundle/src/test/resources/org/apache/aries/spifly/dynamic/impl4/META-INF/services/org.apache.aries.mytest.MySPI
Sat Apr 9 23:03:08 2011
@@ -0,0 +1,2 @@
+org.apache.aries.spifly.dynamic.impl4.MySPIImpl4
+
|