[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Scoped Kernels
adrian@jboss.org
do-not-reply at jboss.com
Fri Feb 23 11:20:35 EST 2007
"alesj" wrote : I'm quite done with scoping, but I have encountered a few problems:
|
| 1) When a bean that represents the classloader for other beans is deployed in some scope, other dependent beans (from same scope) are unable to find him - since they are not described yet == no scope knowlegde.
|
You can't use a classloader in a scope if the scope requires
that classloader to exist before it is constructed.
It's like trying to have a deployment depend upon a classloader
in that deployment. In that case, you fix it by doing:
| <classloader><null/></classloader>
|
So it doesn't depend upon itself.
anonymous wrote :
| 2) If I deploy bean with the same name and the same class in 2 different scopes, KernelControllerContext scope lacks some differentiation between different context instances - fullScope with INSTANCE and CLASS is the same for both context instances. I currently added context's hash under WORK level, to be able to test this.
|
I don't understand this. 2 contexts in different scopes should not have
the same ScopeKey.
anonymous wrote :
| 3) While testing, how to get the actual bean / context from bootstrapping kernel / controller, since the real bean / context is present in some scoped child controller.
There are a number of apis that need updating to understand Scope.
i.e. passing in the ScopeKey as an additional parameter.
The old api should invoke the new api with the default scope.
Retrieving the context is one of them.
There are other apis that need to be able to retrieve all contexts in all scopes
and include the scope in the identity.
The checking of incomplete contexts in the kernel deployer
or the repository service is one of the latter.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021174#4021174
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021174
More information about the jboss-dev-forums
mailing list