Skip to content

Allow to identify loaded spring contexts [SPR-1646] #6343

Closed

Description

@spring-projects-issues

Eugene Kuleshov opened SPR-1646 and commented

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.


Affects: 1.2.6, 2.0 M1

Attachments:

Issue Links:

2 votes, 4 watchers

Activity

  1. spring-projects-issues commented on Jan 29, 2006

    @spring-projects-issues
    CollaboratorAuthor

    Eugene Kuleshov commented

    Here is my quick and dirty patch that implements this functionality

  2. spring-projects-issues commented on Feb 28, 2006

    @spring-projects-issues
    CollaboratorAuthor

    Eugene Kuleshov commented

    Alternative and more powerful approach is suggested in #6408

  3. spring-projects-issues commented on May 31, 2006

    @spring-projects-issues
    CollaboratorAuthor

    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.

  4. spring-projects-issues commented on May 31, 2006

    @spring-projects-issues
    CollaboratorAuthor

    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...

  5. spring-projects-issues commented on May 31, 2006

    @spring-projects-issues
    CollaboratorAuthor

    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.

  6. spring-projects-issues commented on Sep 22, 2015

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Closing groups of outdated issues. Please reopen if still relevant.

  7. added
    status: declined
    type: enhancement
    in: core
    on Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: corestatus: declinedtype: enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions