You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow to identify loaded spring contexts [SPR-1646] #6343
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Currently ApplicationContext and BeanFactory have no id that would allow to uniquely identyfy them. I am working on some monitoring tool and have to differentiate one context from another.
Please introduce optional beans/@id attribute in XML definition and correspond get/setId methods on BeanFactory that would allow to specify id for each given context.
This is useful. The only question to me is if this is something so basic it should be handled by the normal parser, along witht he regular meta tag. I would almost argue for the latter.
I am not convinced however that #6408 is necesarilly the best way to handle this particular need (unique ID for a context), given the need to handle multiple XML fragments and have a story in that case. It seems to me the mechanism needs to have abit more intelligence...
Colin, why it would be bad idea to allow to define meta for beans element? When loaded it could be just added to the BeanFactory or ApplicationContext attributes and it will be up to user how he wnat to manage those attributes...
If you insist, Spring can detect redefined attributes in this case and log a warning or something.
in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement
Activity
spring-projects-issues commentedon Jan 29, 2006
Eugene Kuleshov commented
Here is my quick and dirty patch that implements this functionality
spring-projects-issues commentedon Feb 28, 2006
Eugene Kuleshov commented
Alternative and more powerful approach is suggested in #6408
spring-projects-issues commentedon May 31, 2006
Colin Sampaleanu commented
This is useful. The only question to me is if this is something so basic it should be handled by the normal parser, along witht he regular meta tag. I would almost argue for the latter.
spring-projects-issues commentedon May 31, 2006
Colin Sampaleanu commented
Sorry, my comment above applies to #6408!
I am not convinced however that #6408 is necesarilly the best way to handle this particular need (unique ID for a context), given the need to handle multiple XML fragments and have a story in that case. It seems to me the mechanism needs to have abit more intelligence...
spring-projects-issues commentedon May 31, 2006
Eugene Kuleshov commented
Colin, why it would be bad idea to allow to define meta for beans element? When loaded it could be just added to the BeanFactory or ApplicationContext attributes and it will be up to user how he wnat to manage those attributes...
If you insist, Spring can detect redefined attributes in this case and log a warning or something.
spring-projects-issues commentedon Sep 22, 2015
Juergen Hoeller commented
Closing groups of outdated issues. Please reopen if still relevant.