This content has been marked as final.
Show 3 replies
-
1. Re: Missing class scope in InstantiateAction
alesj Mar 25, 2008 8:58 AM (in response to alesj)"alesj" wrote:
What's the way to update ScopeInfo/MetaData with class information?ScopeInfo scopeInfo = context.getScopeInfo(); ScopeKey scopeKey = new ScopeKey(); for (Scope scope : scopeInfo.getScope().getScopes()) scopeKey.addScope(scope); scopeKey.addScope(CommonLevels.CLASS, info.getClassInfo().getType()); scopeInfo.setScope(scopeKey);
OK, adding this after the BeanInfo has been set helps, since the metadata 'repairs' itself.
But is this the right way? :-) -
2. Re: Missing class scope in InstantiateAction
alesj Mar 25, 2008 9:34 AM (in response to alesj)"alesj" wrote:
But is this the right way? :-)
e.g. do we need some explicit MetaData removal from KernelMetaDataRepository before we change the scope key in ScopeInfo? -
3. Re: Missing class scope in InstantiateAction
adrian.brock Mar 25, 2008 10:20 AM (in response to alesj)"alesj" wrote:
"alesj" wrote:
But is this the right way? :-)
e.g. do we need some explicit MetaData removal from KernelMetaDataRepository before we change the scope key in ScopeInfo?
You need to remove the old context before you change the key and re-register it.
See the PreIntallAction or the KernelMetaDataRepository interface.