[jboss-dev-forums] [Design the new POJO MicroContainer] - Automatic Scoped Kernels - A good idea
adrian@jboss.org
do-not-reply at jboss.com
Mon Feb 26 08:28:28 EST 2007
Given Ales's latest issue/hack,
I'm beginning to wonder whether the automatic construction of scoped
kernels is really such a good idea.
For ease of use it probably is, but making it work is requiring too many hacks
and I have a feeling that Ales is doing it wrong anyway or has at least
misunderstood part of it (Given some of the problems he is reporting).
The alternate approach would be to move the scoping of kernels to the deployers.
i.e. The MC can support scoped kernels but you have to use an api
to configure them.
The deployment chain would then look something like:
1) Parsing as now (for POJOs - BeanDeployer)
2) ClassLoading deployer (as now or replaced with OSGi style)
3) Component Deployer (for POJOs KernelDeploymentDeployer)
4) Scoping Deployer (NEW looks at BeanMetaData and creates ScopedKernel)
5) Real Deployer (as now BeanMetaDataDeployer - but deploys into ScopedKernel)
This gives a cleaner api and probably makes it easier to override scoping rules.
The downside is that you don't get scoping out of the box, you either
have to use the deployers or write your own scoping config code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022413#4022413
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022413
More information about the jboss-dev-forums
mailing list