[jboss-dev-forums] [Design the new POJO MicroContainer] - AbstractManagedObjectFactory needs to be refactored

scott.stark@jboss.org do-not-reply at jboss.com
Wed Feb 6 12:43:31 EST 2008


The current org.jboss.managed.plugins.factory.AbstractManagedObjectFactory has too much going on to be reusable. In particular, the  InstanceClassFactory(Serializable), ManagedObjectPopulator(Serializable) parameterized interfaces cannot be changed by subclasses, for example, this cannot be done:


  | public class LocalDSInstanceClassFactory extends AbstractManagedObjectFactory
  |    implements InstanceClassFactory<LocalDataSourceDeploymentMetaData>
  | {
  | ...
  | }
  | ...
  |       ManagedObjectFactory mof = ManagedObjectFactory.getInstance();
  |       LocalDSInstanceClassFactory icf = new LocalDSInstanceClassFactory();
  |       mof.setInstanceClassFactory(LocalDataSourceDeploymentMetaData.class, icf);
  | 

Either the AbstractManagedObjectFactory needs to keep the interface paramterization, or the default implementations need to be plugins with different base classes. I'm working on the latter local to the jbossas/connector project to validate what works.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127111#4127111

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127111



More information about the jboss-dev-forums mailing list