Announcement Announcement Module
Collapse
No announcement yet.
how to determine the scope of the current bean? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to determine the scope of the current bean?

    Hi,

    Is there any way of determining the scope of the current bean? I have a stateful custom spring-batch component. This means that the bean definition should always be configured with scope="step". We are using XML application contexts, not annotations so I can't use @Scope.

    I would like to throw an exception in afterPropertiesSet() if the bean is not configured with "step" scope.

  • #2
    Hello

    Even if you know such option.... I suggest you consider work with test methods (Junit)....you can clear any potential leak about configuration and performance...

    Interesting your request about know the scope of a bean....

    Comment

    Working...
    X