Results 1 to 2 of 2

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

  1. #1
    Join Date
    Jun 2005
    Location
    Belgium
    Posts
    6

    Default 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
    HELLOWORLD

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    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.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. Spring HTTP Invoker and HTTP Forwarding Proxy
    By dkar77 in forum Remoting
    Replies: 3
    Last Post: Sep 21st, 2005, 08:59 PM
  3. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  4. Spring code remarks
    By Alarmnummer in forum Architecture
    Replies: 18
    Last Post: Apr 7th, 2005, 07:17 AM
  5. Questioning the core component
    By Martin Kersten in forum Swing
    Replies: 6
    Last Post: Feb 21st, 2005, 03:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •