[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: GenericBeanFactory and install methods
scott.stark@jboss.org
do-not-reply at jboss.com
Wed Apr 9 04:34:39 EDT 2008
And going through this again, its probably nothing more than another pattern on top of existing mc notions:
| interface ComponentFactory
| {
| List<String> createComponent(String baseName);
| }
|
| class GenericComponentFactory implements KernelControllerContextAware
| {
| BeanMetaDataFactory componentsFactory;
| int compID;
|
| List<String> createComponent(String baseName)
| {
| int nextID = incCompID();
| KernelController controller = ...;
| List<BeanMetaData> compBeans = componentsFactory.getBeans();
| for(BeanMetaData bmd : compBeans)
| {
| String beanName = baseName + bmd.getName() + "#" + nextID;
| controller.install(beanName, bmd); // Ignoring there is no install taking the bean name
| compNames.add(beanName);
| }
| return compNames;
| }
| }
|
The ComponentFactory/GenericComponentFactory would be used similar to how BeanFactory/GenericBeanFactory are currently.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142612#4142612
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142612
More information about the jboss-dev-forums
mailing list