Announcement Announcement Module
Collapse
No announcement yet.
Spring http invoker: retrieving the application context...? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring http invoker: retrieving the application context...?

    Hello all,

    we have a gui client application talking to services configured with spring http invoker. The dependencies of these services are configured in the spring application context.

    How to retrieve a reference to the application context used by spring http invoker in classes that are not configured by spring. e.g. we need a reference to the datasource defined in the application context in a workflow utility class. This workflow utility class cannot be configured by spring.

    How to retrieve a reference :?:

    kind regards,
    Geert Van Landeghem

  • #2
    Can you modify the workflow utility class at all? If so, why can't it be configured by Spring? I'm not sure I fully understand your issue, so an illustration may help.

    As a last resort, you could make one of your classes ApplicationContextAware, and expose a static getApplicationContext() method, but of course this is not really in the spirit of Dependency Injection.

    Comment

    Working...
    X