Ken,

I think the factories should wait until their init method is called otherwise they are registering before they have finished being initialized. This also allows a "this" reference to leak before the object has finished being constructed (i.e. it could be invoked before it is fully instantiated). This problem is in all the recent scope factory changes.

Will this fix the issue Ant mentioned yesterday where leaving off @Scope("MODULE") gave a NPE?

--
Jeremy

public class ModuleScopeObjectFactory implements ObjectFactory<ModuleScopeContainer> {
+
+    public ModuleScopeObjectFactory(@Autowire ScopeRegistry registry) {
+        registry.registerFactory(Scope.MODULE, this);
+    }
+
+    @Init(eager = true)
+    public void init() {
+    }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to