0 Replies Latest reply on Feb 6, 2008 12:43 PM by starksm64

    AbstractManagedObjectFactory needs to be refactored

    starksm64

      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.