aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1550832 - in /aries/trunk/blueprint: blueprint-itests/ blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/ blueprint-testbundlea/src/main/resou...
Date Fri, 13 Dec 2013 20:07:18 GMT
Author: dkulp
Date: Fri Dec 13 20:07:17 2013
New Revision: 1550832

URL: http://svn.apache.org/r1550832
Log:
Add a test case
Flip tests to using the latest "core", "cm", etc.. bundles instead of the big 1.0.0 bundle.
This causes test failures... will take to dev list

Added:
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java
  (with props)
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java
  (with props)
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java
  (with props)
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java
  (with props)
    aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java
  (with props)
Modified:
    aries/trunk/blueprint/blueprint-itests/pom.xml
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
    aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
    aries/trunk/blueprint/blueprint-testbundlea/src/main/resources/OSGI-INF/blueprint/config.xml
    aries/trunk/blueprint/blueprint-testbundleb/pom.xml
    aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml

Modified: aries/trunk/blueprint/blueprint-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/pom.xml?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-itests/pom.xml Fri Dec 13 20:07:17 2013
@@ -56,17 +56,18 @@
             <artifactId>osgi</artifactId>
             <scope>provided</scope>
         </dependency>
-        <dependency>
-            <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>org.apache.aries.blueprint</artifactId>
-            <scope>test</scope>
-            <version>1.0.0</version>
-        </dependency>
+
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.jexl.evaluator</artifactId>
             <scope>test</scope>
             <version>1.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.aries.blueprint</groupId>
+                    <artifactId>org.apache.aries.blueprint.core</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.aries</groupId>
@@ -84,7 +85,7 @@
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.testbundlea</artifactId>
             <scope>test</scope>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
@@ -165,9 +166,15 @@
             <version>4.0</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.core</artifactId>
+            <version>1.4.0-SNAPSHOT</version>
+            <type>bundle</type>
+        </dependency>
+        <dependency>
             <groupId>org.apache.aries.proxy</groupId>
             <artifactId>org.apache.aries.proxy</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.quiesce</groupId>
@@ -182,6 +189,12 @@
             <version>1.0.0</version>
             <type>bundle</type>
             <scope>compile</scope>
+            <exclusions>
+            <exclusion>
+                <groupId>org.apache.aries.blueprint</groupId>
+                <artifactId>org.apache.aries.blueprint.core</artifactId>
+            </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
@@ -191,29 +204,36 @@
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>org.apache.aries.blueprint.core</artifactId>
-            <version>1.2.1-SNAPSHOT</version>
+            <artifactId>org.apache.aries.blueprint.cm</artifactId>
+            <version>1.0.3</version>
             <type>bundle</type>
             <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.aries.blueprint</groupId>
+                    <artifactId>org.apache.aries.blueprint.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-jexl</artifactId>
+            <version>2.0</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>org.apache.aries.blueprint.cm</artifactId>
+            <artifactId>org.apache.aries.blueprint.annotation.api</artifactId>
             <version>1.0.0</version>
             <type>bundle</type>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
-            <artifactId>blueprint-parser</artifactId>
-            <scope>provided</scope>
+            <artifactId>org.apache.aries.blueprint.annotation.impl</artifactId>
             <version>1.0.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-jexl</artifactId>
-            <version>2.0</version>
-            <scope>test</scope>
+            <type>bundle</type>
+            <scope>compile</scope>
         </dependency>
     </dependencies>
 

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
(original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/ASMMultiBundleTest.java
Fri Dec 13 20:07:17 2013
@@ -21,10 +21,13 @@ package org.apache.aries.blueprint.itest
 import static org.apache.aries.itest.ExtraOptions.mavenBundle;
 import static org.apache.aries.itest.ExtraOptions.paxLogging;
 import static org.apache.aries.itest.ExtraOptions.testOptions;
+
 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 static org.junit.Assert.fail;
+
 import static org.ops4j.pax.exam.CoreOptions.equinox;
 
 import java.util.ArrayList;
@@ -35,11 +38,17 @@ import org.apache.aries.blueprint.testbu
 import org.apache.aries.blueprint.testbundlea.NSHandlerTwo;
 import org.apache.aries.blueprint.testbundlea.ProcessableBean;
 import org.apache.aries.blueprint.testbundlea.ProcessableBean.Phase;
+import org.apache.aries.blueprint.testbundlea.multi.InterfaceA;
+import org.apache.aries.blueprint.testbundlea.multi.InterfaceB;
+import org.apache.aries.blueprint.testbundlea.multi.InterfaceC;
+import org.apache.aries.blueprint.testbundlea.multi.InterfaceD;
 import org.apache.aries.blueprint.testbundleb.OtherBean;
 import org.apache.aries.blueprint.testbundleb.TestBean;
 import org.apache.aries.itest.AbstractIntegrationTest;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
+
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
 import org.osgi.framework.Bundle;
@@ -82,7 +91,7 @@ public class ASMMultiBundleTest extends 
             assertTrue("interceptor invocation "+expected[i]+" not found",found[i]);
         }
     }
-    
+
     @Test
     public void multiBundleTest() throws Exception {
         
@@ -196,6 +205,48 @@ public class ASMMultiBundleTest extends 
         assertTrue(objOther instanceof OtherBean);
         assertEquals("test1value", ((OtherBean)objOther).getTestValue());
     }
+
+    @Test
+    public void testMultiInterfaceReferences() throws Exception {
+        //bundlea provides the ns handlers, bean processors, interceptors etc for this test.
+        Bundle bundlea = context().getBundleByName("org.apache.aries.blueprint.testbundlea");
+        assertNotNull(bundlea);
+        bundlea.start();
+        
+        //bundleb makes use of the extensions provided by bundlea
+        Bundle bundleb = context().getBundleByName("org.apache.aries.blueprint.testbundleb");
+        assertNotNull(bundleb);
+        bundleb.start();
+        
+        //bundleb's container will hold the beans we need to query to check the function
+        //provided by bundlea functioned as expected
+        BlueprintContainer beanContainer = 
+            Helper.getBlueprintContainerForBundle(context(), "org.apache.aries.blueprint.testbundleb");
+        assertNotNull(beanContainer);
+
+        Object obj1 = beanContainer.getComponentInstance("OnlyA");
+        Object obj2 = beanContainer.getComponentInstance("AandB");
+        Object obj3 = beanContainer.getComponentInstance("AandBandC");
+        Object obj4 = beanContainer.getComponentInstance("AandBandCandD");
+        
+        assertEquals("A", ((InterfaceA)obj1).methodA());
+        assertEquals("A", ((InterfaceA)obj2).methodA());
+        assertEquals("A", ((InterfaceA)obj3).methodA());
+        assertEquals("B", ((InterfaceB)obj2).methodB());
+        assertEquals("C", ((InterfaceC)obj3).methodC());
+        
+        assertFalse(obj1 instanceof InterfaceC);
+        assertFalse(obj2 instanceof InterfaceC);
+        assertFalse(obj1 instanceof InterfaceB);
+        
+        assertTrue(obj4 instanceof InterfaceD);
+        try {
+            ((InterfaceD)obj4).methodD();
+            fail("This should not work");
+        } catch (org.osgi.service.blueprint.container.ServiceUnavailableException t) {
+            //expected
+        }        
+    }
     
     @org.ops4j.pax.exam.junit.Configuration
     public static Option[] configuration() {

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
(original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2BTCustomizerTest.java
Fri Dec 13 20:07:17 2013
@@ -86,9 +86,13 @@ public class BlueprintContainer2BTCustom
             bundle.start();
             
             // start the blueprint bundle and it should detect the previously started blueprint
sample
-            Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint");
+            Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint.core");
             blueprintBundle.start();
+            Bundle blueprintCMBundle = context().getBundleByName("org.apache.aries.blueprint.cm");
+            blueprintCMBundle.start();
             Thread.sleep(2000);
+            
+            
 
             // do the test
             Helper.testBlueprintContainer(new RichBundleContext(compositeBundleContext),
bundle);

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
(original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/BlueprintContainer2Test.java
Fri Dec 13 20:07:17 2013
@@ -52,11 +52,14 @@ public class BlueprintContainer2Test ext
         cf.update(props);
 
         Bundle bundle = context().getBundleByName("org.apache.aries.blueprint.sample");
-        Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint");
+        Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint.core");
+        Bundle blueprintCMBundle = context().getBundleByName("org.apache.aries.blueprint.cm");
+        assertNotNull(bundle);
         assertNotNull(bundle);
 
         bundle.start();
         blueprintBundle.start();
+        blueprintCMBundle.start();
         
         // do the test
         Helper.testBlueprintContainer(context(), bundle);

Modified: aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
(original)
+++ aries/trunk/blueprint/blueprint-itests/src/test/java/org/apache/aries/blueprint/itests/Helper.java
Fri Dec 13 20:07:17 2013
@@ -73,8 +73,14 @@ public class Helper {
                     mavenBundle("org.ow2.asm", "asm-all"),
                     mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.jexl.evaluator"),
                     
-                ((startBlueprint) ? mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint")
:
-                    mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").noStart())
+                    ((startBlueprint) ? mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.api")
:
+                        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.api").noStart()),
+                    ((startBlueprint) ? mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.core")
:
+                        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.core").noStart()),
+                    ((startBlueprint) ? mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.cm")
:
+                        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.cm").noStart()),
+                    ((startBlueprint) ? mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.api")
:
+                        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint.annotation.api").noStart())
         );
     }
     

Added: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java?rev=1550832&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java
(added)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java
Fri Dec 13 20:07:17 2013
@@ -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.blueprint.testbundlea.multi;
+
+/**
+ * 
+ */
+public interface InterfaceA {
+
+    String methodA();
+}

Propchange: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceA.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java?rev=1550832&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java
(added)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java
Fri Dec 13 20:07:17 2013
@@ -0,0 +1,24 @@
+/**
+ * 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.blueprint.testbundlea.multi;
+
+public interface InterfaceB {
+    String methodB();
+}

Propchange: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java?rev=1550832&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java
(added)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java
Fri Dec 13 20:07:17 2013
@@ -0,0 +1,23 @@
+/**
+ * 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.blueprint.testbundlea.multi;
+
+public interface InterfaceC {
+    String methodC();
+}

Propchange: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceC.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java?rev=1550832&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java
(added)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java
Fri Dec 13 20:07:17 2013
@@ -0,0 +1,23 @@
+/**
+ * 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.blueprint.testbundlea.multi;
+
+public interface InterfaceD {
+    String methodD();
+}

Propchange: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/InterfaceD.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java?rev=1550832&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java
(added)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java
Fri Dec 13 20:07:17 2013
@@ -0,0 +1,46 @@
+/**
+ * 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.blueprint.testbundlea.multi;
+
+/**
+ * 
+ */
+public class MultiService implements InterfaceA, InterfaceB, InterfaceC, InterfaceD {
+
+    /** {@inheritDoc}*/
+    public String methodC() {
+        return "C";
+    }
+
+    /** {@inheritDoc}*/
+    public String methodB() {
+        return "B";
+    }
+
+    /** {@inheritDoc}*/
+    public String methodA() {
+        return "A";
+    }
+
+    /** {@inheritDoc}*/
+    public String methodD() {
+        return "D";
+    }
+}

Propchange: aries/trunk/blueprint/blueprint-testbundlea/src/main/java/org/apache/aries/blueprint/testbundlea/multi/MultiService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: aries/trunk/blueprint/blueprint-testbundlea/src/main/resources/OSGI-INF/blueprint/config.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundlea/src/main/resources/OSGI-INF/blueprint/config.xml?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundlea/src/main/resources/OSGI-INF/blueprint/config.xml
(original)
+++ aries/trunk/blueprint/blueprint-testbundlea/src/main/resources/OSGI-INF/blueprint/config.xml
Fri Dec 13 20:07:17 2013
@@ -84,5 +84,15 @@
         </service-properties>
     </service>
     
+    <bean id="MultiService" class="org.apache.aries.blueprint.testbundlea.multi.MultiService"/>
+    <service ref="MultiService">
+    	<interfaces>
+    		<value>org.apache.aries.blueprint.testbundlea.multi.InterfaceA</value>
+    		<value>org.apache.aries.blueprint.testbundlea.multi.InterfaceB</value>
+    		<value>org.apache.aries.blueprint.testbundlea.multi.InterfaceC</value>
+    	</interfaces>
+    </service>
+    
+    
 </blueprint>
 

Modified: aries/trunk/blueprint/blueprint-testbundleb/pom.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundleb/pom.xml?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundleb/pom.xml (original)
+++ aries/trunk/blueprint/blueprint-testbundleb/pom.xml Fri Dec 13 20:07:17 2013
@@ -58,7 +58,7 @@
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>
             <artifactId>org.apache.aries.blueprint.testbundlea</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.aries.blueprint</groupId>

Modified: aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml?rev=1550832&r1=1550831&r2=1550832&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
(original)
+++ aries/trunk/blueprint/blueprint-testbundleb/src/main/resources/OSGI-INF/blueprint/config.xml
Fri Dec 13 20:07:17 2013
@@ -17,7 +17,7 @@
 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
-           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
+           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.4.0"
            xmlns:one="http://ns.handler.one"
            xmlns:two="http://ns.handler.two"
            xmlns:three="http://ns.handler.three"
@@ -121,5 +121,28 @@
           <mytest:foo xmlns:mytest="http://ns.handler.mytest">blah</mytest:foo>
       </seven:stuff>
   </seven:nshandlerseven> 
+  
+  
+  <reference id="OnlyA" interface="org.apache.aries.blueprint.testbundlea.multi.InterfaceA"/>
+  <reference id="AandB" interface="org.apache.aries.blueprint.testbundlea.multi.InterfaceA">
+  	<ext:additional-interfaces>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceB</value>
+  	</ext:additional-interfaces>
+  </reference>
+  <reference id="AandBandC" interface="org.apache.aries.blueprint.testbundlea.multi.InterfaceA">
+  	<ext:additional-interfaces>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceB</value>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceC</value>
+  	</ext:additional-interfaces>
+  </reference>
+  <!--  this shouldn't ever resolve as D isn't bound -->
+  <reference id="AandBandCandD" interface="org.apache.aries.blueprint.testbundlea.multi.InterfaceA"
timeout="100">
+  	<ext:additional-interfaces>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceB</value>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceC</value>
+  	    <value>org.apache.aries.blueprint.testbundlea.multi.InterfaceD</value>
+  	</ext:additional-interfaces>
+  </reference>
+  
 </blueprint>
 



Mime
View raw message