[Design the new POJO MicroContainer] - Precedence level
by bill.burke@jboss.com
I'm looking at the Seam component model to see how it could be merged with MC. Here's an interesting feature they got.
When you deploy a component, it can have both dependencies as well as a precedence level. Basically the precedence level is a numerical value of where in the chain the component should be deployed. Gavin uses this so that somebody could say: "I want this component deployed after all Seam BUILT IN components".
Maybe we could translate this into logical groupings of beans:
| <bean name="Foo" group="BUILT IN" .../>
| <bean name="Bar" group="BUILT IN" .../>
|
|
| <bean name="MyStuff">
| <depends-group>BUILT IN</depends-group>
| </bean>
|
"MyStuff" would have a logical dependency to Foo and Bar through the "BUILT IN" tag.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008899#4008899
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008899
17 years, 11 months
[Design the new POJO MicroContainer] - Re: Scoped beans deployment
by bill.burke@jboss.com
Here's some notes I jotted down when looking at SEam:
* Context/scope aware kernel
- ability to define components and attach them to a scope
- metadata would set in scope definition and not execute to expliclity created.
- can inject between scopes. One scope can override another scope with bean definition.
- almost "federated" but a little different as you can declare beans of different scopes in the same file.
- maybe starting off with federation is the correct way. With a kernel having a parent and children kernels.
- scope/context is a bit different than federation. You'd want the base template of the scope/context defined in bean.xml and you want to ask the kernel to create you a specific scope/context. So scope/context may be implemented via federation, but the kernel would have to know about the scope.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008893#4008893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008893
17 years, 11 months
[Design the new POJO MicroContainer] - Re: Scoped beans deployment
by adrian@jboss.org
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
17 years, 11 months