[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Scoped beans deployment

adrian@jboss.org do-not-reply at jboss.com
Wed Jan 31 12:45:20 EST 2007


The idea is to be able define a sub-kernel in the scoped metadata.


  | Kernel kernel = MetaData.getMetaData(Kernel.class);
  | 

Then it needs two changes:

1) Either modifying the KernelController or create a subclass
that understands delegation from sub-kernel to parent kernels

A bean in a sub-kernel can depend upon a bean in a parent kernel
but not the other way around!

2) Adding something to the kernel deployment that says you want your
own private kernel for this deployment.

Something like:


  | <deployment kernel="private">
  |    <bean ....>
  | </deployment>
  | 

Although I think a more general notion would come out of the work
we need to do to define scoped metadata, probably by annotating the
deployment or bean?

e.g. define these beans in the jca subsystem scope

  | <deployment>
  |    <annotation>@org.jboss.metadata.scope.Subsystem("jca")</annotation>
  |    <bean ....>
  | </deployment>
  | 

For the metadata there already is a thread local to get the current context:

  | MetaData metaData = MetaDataStack.peek();
  | 

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

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



More information about the jboss-dev-forums mailing list