Announcement Announcement Module
Collapse
No announcement yet.
Load different spring-contexts in seperate Threads Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Load different spring-contexts in seperate Threads

    Hi Everybody,

    I developed such API for integration with different tiers

    Now for each integration with tier X for example I just need to develop an integration module for that tier with some customization and overriding for some beans in the API module

    Then, the integration context for tier X (tierX-integration-context.xml) will be loaded from a servlet context in web.xml

    The problem is when I try to load integration context for another tier for example tierY-integration-context.xml

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath*:/spring/tierX-integration-context.xml,classpath*:/spring/tierY-integration-context.xml</param-value>
    </context-param>

    I got strange errors linked to extended beans from the API (that abstract bean are declared in the API and overridden by each integration module with the same id) while contexts initialization like:

    A job configuration with this name [xyz-job] was already registered

    So, what I want to do is to load each context in a separate Thread in order to guarantee complete independence between different contexts. is this possible with spring using some configuration ? I don't like to override the context loader.

    Regards
    Abderrazzek

  • #2
    This question is probably a better candidate for StackOverflow, perhaps with the "spring" tag.

    Could you post your question there?
    The forums are moving to stackoverflow, a page explaining all this will be available there in a few days: http://spring.io/questions





    Comment

    Working...
    X