Started work on componentizing the current user management.
[utils] / system / spring / src / main / java / org / wamblee / system / spring / SpringComponent.java
index aea9b15aa1a548eacfe9e7c1a39667f684606003..657d11e4f8bd31bfb54341bc7462d4c285c5c62d 100644 (file)
@@ -94,10 +94,6 @@ public class SpringComponent extends AbstractComponent<Scope> {
                        setProperty((String) key, aProperties.getProperty((String) key));
                }
        }
-       
-       public Scope start() { 
-               return super.start(new DefaultScope(new ProvidedInterface[0]));
-       }
 
        @Override
        protected Scope doStart(Scope aExternalScope) {
@@ -113,14 +109,16 @@ public class SpringComponent extends AbstractComponent<Scope> {
                        registerRequiredServices(parentContext);
 
                        parentContext.refresh();
-
+                       
+                       System.out.println("Parent context " + parentContext);
+                   
                        AbstractApplicationContext context = parseConfigFiles(parentContext);
 
                        context
                                        .addBeanFactoryPostProcessor(new PropertySetter(_properties));
                        context.refresh();
 
-                       exposeProvidedServices(context, scope);
+                       exposeProvidedServices(context, aExternalScope);
                        
                        scope.put(CONTEXT_KEY, context);
                        return scope; 
@@ -144,7 +142,6 @@ public class SpringComponent extends AbstractComponent<Scope> {
                        }
                        addInterface(_provided.get(name), svc, aScope);
                        System.out.println("addService " + _provided.get(name) + " " + svc);
-                       aScope.publishInterface(_provided.get(name), svc);
                }
        }
 
@@ -152,7 +149,7 @@ public class SpringComponent extends AbstractComponent<Scope> {
                // Parse spring config files
 
                return new ClassPathXmlApplicationContext((String[]) _configFiles,
-                               aParentContext);
+                               false, aParentContext);
        }
 
        private void registerRequiredServices(GenericApplicationContext aParentContext) {