[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Automatic Scoped Kernels - A good idea
adrian@jboss.org
do-not-reply at jboss.com
Mon Feb 26 09:13:18 EST 2007
"alesj" wrote :
| Or which part you think is really misunderstood?
|
It was something you said either last week or the previous week
about having duplicates and I responded that I didn't understand
the issue since it should be impossible to have duplicates in the same scope.
I'm also not sure whether you understood the issue with the classloader
creating a dependency on itself?
ClassLoader (as bean) -> scope annotations creates scope -> requires classloader (itself)
There's also some other subtle issues about how we expect to use the scopes.
e.g. A bean in a kernel deployment might have the full scope:
Application=myapp.ear
Deployment=mybeans.jar
Class=MyBean.class
Instance=BeanName
But you aren't going to create a ScopedKernel at the Intance level or class level.
The natural level for the scope would be at the Application/Deployment pair.
This latter issue is much easier to deal with from the deployers
(which understand deployment structure) than it is from the automatic scope generation
that we are prototyping.
I also think there will be use cases where people want to assign a scope
to a bean (or MBean) for the purposes of the MetaData overrides but don't
want a full scoped kernel for their deployment?
And we still need to address the issue I raised with "exporting" beans
into global scope (if that really is a use case ?).
Basically, like I said at the beginning, although we are building a mechanism
to do something called scoped kernel, we haven't gone through a requirements
gathering stage to see whether it meets the real need(s).
This makes me worried. :-)
I'm happy that the controller api should support scoped kernels (the implementation side)
but I'm not so sure on the "policy" side that the way we are creating
assigning contexts to scope is correct.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022440#4022440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022440
More information about the jboss-dev-forums
mailing list