james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1142596 - /james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
Date Mon, 04 Jul 2011 09:42:40 GMT
Author: norman
Date: Mon Jul  4 09:42:40 2011
New Revision: 1142596

URL: http://svn.apache.org/viewvc?rev=1142596&view=rev
Log:
Use the right bundle context when resolve stuff. See JAMES-835

Modified:
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java

Modified: james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java?rev=1142596&r1=1142595&r2=1142596&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
(original)
+++ james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/osgi/AbstractServiceTracker.java
Mon Jul  4 09:42:40 2011
@@ -53,7 +53,6 @@ public abstract class AbstractServiceTra
     private BundleContext context;
     private BeanFactory factory;
     private String configuredClass;
-    private BeanNameServicePropertiesResolver resolver;
     private ServiceRegistration reg;
 
     @Override
@@ -91,6 +90,12 @@ public abstract class AbstractServiceTra
                         
                         // Get the right service properties from the resolver
                         Properties p = new Properties();
+
+                        // Setup a resolver
+                        BeanNameServicePropertiesResolver resolver = new BeanNameServicePropertiesResolver();
+                        resolver.setBundleContext(b.getBundleContext());
+
+                        
                         p.putAll(resolver.getServiceProperties(getComponentName()));
                         Class<?> clazz = getServiceClass();
                         
@@ -125,10 +130,6 @@ public abstract class AbstractServiceTra
         ConfigurationProvider confProvider = factory.getBean(ConfigurationProvider.class);
         HierarchicalConfiguration config = confProvider.getConfiguration(getComponentName());
 
-        // Setup a resolver
-        resolver = new BeanNameServicePropertiesResolver();
-        resolver.setBundleContext(context);
-
         // Get the configuration for the class
         configuredClass = config.getString("[@class]");
         context.addBundleListener(this);



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message