aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
Subject svn commit: r1000399 - in /incubator/aries/trunk: application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ application/applic...
Date Thu, 23 Sep 2010 10:35:15 GMT
Author: timothyjward
Date: Thu Sep 23 10:35:15 2010
New Revision: 1000399

URL: http://svn.apache.org/viewvc?rev=1000399&view=rev
Log:
ARIES-425 Fix modelling for OBR resolver

Modified:
    incubator/aries/trunk/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
    incubator/aries/trunk/application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ParserProxyImplTest.java
    incubator/aries/trunk/application/application-modeller/src/test/resources/appModeller/test1.eba/bundle1.jar/OSGI-INF/blueprint/bp.xml
    incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/pom.xml
    incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini
    incubator/aries/trunk/samples/blog/blog-assembly/pom.xml
    incubator/aries/trunk/samples/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini
    incubator/aries/trunk/samples/blog/blog-biz/src/main/resources/OSGI-INF/blueprint/blueprint.xml

Modified: incubator/aries/trunk/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
(original)
+++ incubator/aries/trunk/application/application-modeller/src/main/java/org/apache/aries/application/modelling/impl/ImportedServiceImpl.java
Thu Sep 23 10:35:15 2010
@@ -138,7 +138,7 @@ public class ImportedServiceImpl impleme
   @Deprecated
   public ImportedServiceImpl (String ifaceName, Map<String, String> attributes) throws
InvalidAttributeException {
     
-    _optional = false;
+    _optional = ("optional".equals(attributes.get("availability:")));
     _iface = ifaceName;
     _isMultiple = false;
     _componentName = null;

Modified: incubator/aries/trunk/application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ParserProxyImplTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ParserProxyImplTest.java?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ParserProxyImplTest.java
(original)
+++ incubator/aries/trunk/application/application-modeller/src/test/java/org/apache/aries/application/modelling/impl/ParserProxyImplTest.java
Thu Sep 23 10:35:15 2010
@@ -114,11 +114,11 @@ public class ParserProxyImplTest {
     references.addAll(bpelem.getReferences());
     
     // We expect:
-    // bp.xml: 3 services and a reference
+    // bp.xml: 3 services and 2 references
     // bp2.xml: 3 services and a reference list
     //
     assertTrue ("Six services expected, not " + services.size(), services.size() == 6);
-    assertTrue ("Two references expected, not " + references.size(), references.size() ==
2);
+    assertTrue ("Three references expected, not " + references.size(), references.size()
== 3);
     
     Set<WrappedServiceMetadata> expectedServices = getTest2ExpectedServices();
     // ServiceResultSet will contain some services with autogenerated names starting '.'
so we can't 
@@ -173,6 +173,8 @@ public class ParserProxyImplTest {
          
     expectedResults.add(_modellingManager.getImportedService(false, "foo.bar.MyInjectedService",
null, 
         null, "fromOutside", false));
+    expectedResults.add(_modellingManager.getImportedService(true, "foo.bar.MyInjectedService",
null, 
+        null, "anotherOptionalReference", false));
     expectedResults.add(_modellingManager.getImportedService(false, "my.logging.service",
null, "(&(trace=on)(debug=true))", "refList1", true));
     
     return expectedResults;

Modified: incubator/aries/trunk/application/application-modeller/src/test/resources/appModeller/test1.eba/bundle1.jar/OSGI-INF/blueprint/bp.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-modeller/src/test/resources/appModeller/test1.eba/bundle1.jar/OSGI-INF/blueprint/bp.xml?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/application/application-modeller/src/test/resources/appModeller/test1.eba/bundle1.jar/OSGI-INF/blueprint/bp.xml
(original)
+++ incubator/aries/trunk/application/application-modeller/src/test/resources/appModeller/test1.eba/bundle1.jar/OSGI-INF/blueprint/bp.xml
Thu Sep 23 10:35:15 2010
@@ -33,4 +33,5 @@
   
   <reference id="fromOutside" interface="foo.bar.MyInjectedService"/>
 
+  <reference id="anotherOptionalReference" interface="foo.bar.MyInjectedService" availability="optional"/>
 </blueprint>
\ No newline at end of file

Modified: incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/pom.xml?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/pom.xml (original)
+++ incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/pom.xml Thu
Sep 23 10:35:15 2010
@@ -200,7 +200,7 @@
         </dependency>
 <dependency>
             <groupId>org.apache.aries.application</groupId>
-            <artifactId>org.apache.aries.application.resolver.noop</artifactId>
+            <artifactId>org.apache.aries.application.resolver.obr</artifactId>
            
         </dependency>
 

Modified: incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini
(original)
+++ incubator/aries/trunk/samples/ariestrader/assemblies/equinox-test-harness/src/main/filtered-resources/configuration/config.ini
Thu Sep 23 10:35:15 2010
@@ -42,7 +42,7 @@ org.apache.aries.application.utils-${ari
 org.apache.aries.application.runtime-${ariesApplicationVersion}.jar@start,\
 org.apache.aries.application.deployment.management-${ariesApplicationVersion}.jar@start,\
 org.apache.aries.application.modeller-${ariesApplicationVersion}.jar@start,\
-org.apache.aries.application.resolver.noop-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.resolver.obr-${ariesApplicationVersion}.jar@start,\
 org.apache.aries.jndi-${ariesJndiVersion}.jar@start,\
 org.apache.aries.jpa.api-${ariesJpaVersion}.jar@start,\
 org.apache.aries.jpa.blueprint.aries-${ariesJpaVersion}.jar@start,\

Modified: incubator/aries/trunk/samples/blog/blog-assembly/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog/blog-assembly/pom.xml?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/samples/blog/blog-assembly/pom.xml (original)
+++ incubator/aries/trunk/samples/blog/blog-assembly/pom.xml Thu Sep 23 10:35:15 2010
@@ -180,7 +180,7 @@
                 </dependency>
 <dependency>
             <groupId>org.apache.aries.application</groupId>
-            <artifactId>org.apache.aries.application.resolver.noop</artifactId>
+            <artifactId>org.apache.aries.application.resolver.obr</artifactId>
            
         </dependency>
 

Modified: incubator/aries/trunk/samples/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/samples/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini
(original)
+++ incubator/aries/trunk/samples/blog/blog-assembly/src/main/filtered-resources/configuration/config.ini
Thu Sep 23 10:35:15 2010
@@ -34,7 +34,7 @@ org.apache.aries.application.api-${aries
 org.apache.aries.application.utils-${ariesApplicationVersion}.jar@start,\
 org.apache.aries.application.deployment.management-${ariesApplicationVersion}.jar@start,\
 org.apache.aries.application.modeller-${ariesApplicationVersion}.jar@start,\
-org.apache.aries.application.resolver.noop-${ariesApplicationVersion}.jar@start,\
+org.apache.aries.application.resolver.obr-${ariesApplicationVersion}.jar@start,\
 org.apache.felix.fileinstall-2.0.8.jar@start,\
 org.apache.aries.application.runtime-${ariesApplicationVersion}.jar@start,\
 commons-collections-3.2.1.jar@start,\

Modified: incubator/aries/trunk/samples/blog/blog-biz/src/main/resources/OSGI-INF/blueprint/blueprint.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/blog/blog-biz/src/main/resources/OSGI-INF/blueprint/blueprint.xml?rev=1000399&r1=1000398&r2=1000399&view=diff
==============================================================================
--- incubator/aries/trunk/samples/blog/blog-biz/src/main/resources/OSGI-INF/blueprint/blueprint.xml
(original)
+++ incubator/aries/trunk/samples/blog/blog-biz/src/main/resources/OSGI-INF/blueprint/blueprint.xml
Thu Sep 23 10:35:15 2010
@@ -15,7 +15,6 @@
     See the License for the specific language governing permissions and
     limitations under the License.
 -->
-<!--  commented out the optional dependency on comment service temporary in order to bypass
the felix obr jira FELIX-2601 -->
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
@@ -26,25 +25,23 @@
   <bean id="blogEntryManager" class="org.apache.aries.samples.blog.biz.BlogEntryManagerImpl">
     <property name="persistenceService" ref="persistenceManager"/>
   </bean>
-  <!-- 
+ 
   <bean id="blogCommentManager" class="org.apache.aries.samples.blog.biz.BlogCommentManagerImpl">
     <property name="commentService" ref="commentPersistenceService"/>
   </bean>
-  -->
+  
   
   <bean id="bloggingServiceComponent" class="org.apache.aries.samples.blog.biz.BloggingServiceImpl">
     <property name="blogEntryManager" ref="blogEntryManager"/>
     <property name="blogAuthorManager" ref="blogAuthorManager"/>
-    <!-- property name="blogCommentManager" ref="blogCommentManager"/-->
+    <property name="blogCommentManager" ref="blogCommentManager"/>
   </bean>
   
   <service ref="bloggingServiceComponent" interface="org.apache.aries.samples.blog.api.BloggingService"/>
 
   <reference id="persistenceManager" interface="org.apache.aries.samples.blog.api.persistence.BlogPersistenceService"/>
 
-<!-- 
   <reference id="commentPersistenceService" availability="optional" interface="org.apache.aries.samples.blog.api.comment.persistence.BlogCommentService">
     <reference-listener ref="blogCommentManager" bind-method="blogServiceBound" unbind-method="blogServiceUnbound"/>
   </reference>
- -->
 </blueprint>



Mime
View raw message