[jboss-dev-forums] [Design of POJO Server] - Re: Integrating aop-mc-int bean metadata with AS5
adrian@jboss.org
do-not-reply at jboss.com
Fri Aug 8 06:09:33 EDT 2008
"adrian at jboss.org" wrote :
| You're main problem is that you are not using the BeanMetaDataDeployer
| (or whatever code you copied from it) properly.
|
| The BeanMetaDataDeployer is designed to be run against a Component deployment
| which will have a mutable INSTANCE scope. You're running it against the top level
| deployment which has a mutable scope of the whole APPLICATION.
|
A quick hack for you (though not the correct fix)
would be to change your ScopeInfo initialization code to something like:
| // Create an instance scope
| ScopeKey instanceScope = new ScopeKey(new Scope(CommonLevels.INSTANCE, controllerContext.getName()));
|
| // Add the instance to the deployment scope
| ScopeKey deploymentScope = unit.getScope();
| scope = deploymentScope.clone();
| scope.addScope(instanceScope);
|
| // Set the hacked scopes on the controller context
| ScopeInfo scopeInfo = controllerContext.getScopeInfo();
| scopeInfo.setScope(scope);
| scopeInfo.setMutableScope(instanceScope);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169546#4169546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169546
More information about the jboss-dev-forums
mailing list