cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dani...@apache.org
Subject svn commit: r398405 - in /cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi: OSGiSpringBridge.java OSGiSpringECMFactory.java
Date Sun, 30 Apr 2006 19:06:29 GMT
Author: danielf
Date: Sun Apr 30 12:06:28 2006
New Revision: 398405

URL: http://svn.apache.org/viewcvs?rev=398405&view=rev
Log:
Corrected bugs in the OSGi Spring bridge.

Modified:
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringBridge.java
    cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringBridge.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringBridge.java?rev=398405&r1=398404&r2=398405&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringBridge.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringBridge.java
Sun Apr 30 12:06:28 2006
@@ -114,7 +114,7 @@
             // Hinted role: create query
             String query = "(" + HINT_PROPERTY + "=" + hint + ")";
             ServiceReference[] results = ctx.getServiceReferences(itf, query);
-            result = (results != null && results.length > 1) ? results[0] : null;
+            result = (results != null && results.length > 0) ? results[0] : null;
         }
 
         return result;

Modified: cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java?rev=398405&r1=398404&r2=398405&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
(original)
+++ cocoon/trunk/core/cocoon-core/src/main/java/org/apache/cocoon/core/osgi/OSGiSpringECMFactory.java
Sun Apr 30 12:06:28 2006
@@ -215,8 +215,9 @@
                 info("Singleton initialization: ", bean, beanName);
             } else if (isFactoryBean(bean)) {
                 Object service = new FactoryBeanServiceFactory((FactoryBean) bean);
+                logger.debug("Register FactoryBean=" + itfName + " hint=" + hint + " service="
+ service);
                 ServiceRegistration registration =
-                    this.bundleContext.registerService(beanName, service, properties);
+                    this.bundleContext.registerService(itfName, service, properties);
                 synchronized (this) {
                     // keep track on registred services
                     this.serviceRegistrations.put(beanName, registration);



Mime
View raw message