[jboss-dev-forums] [Design the new POJO MicroContainer] - Obtain Kernel from unspecified Context

ALRubinger do-not-reply at jboss.com
Fri May 16 10:43:29 EDT 2008


I believe this has now graduated to a Developer's issue:

http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151409

Ideally POJOs should not depend on the MC API, and could have everything injected from any IoC Container.

However, this introduces a precondition that all POJOs with dependencies on MC Beans are installed into the MC itself.  In many cases, this is not possible.

Additionally, there are cases in which a POJO cannot have the Kernel available to it - ie. any instance that's not created by the application developer.

What are the fundamental arguments against the following construct:

KernelRegistry registry = KernelRegistry.getRegistry(); // Singleton
  | 
  | /*
  |  * The Registry maintains a Map of all Kernels created under a key 
  |  * of some KernelContext
  |  */
  | 
  | // Properties from somewhere, possibly jboss-mc.properties
  | KernelContext context = new KernelContext();
  | // KernelContext context = new KernelContext(Properties); // Valid as well
  | 
  | Kernel kernel = registry.getKernel(context);

?

S,
ALR

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

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



More information about the jboss-dev-forums mailing list