Announcement Announcement Module
Collapse
No announcement yet.
Inject Dependency into Object Created at Runtime Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Inject Dependency into Object Created at Runtime

    I have a class that gets invoked remotely from Flex, call it FooService. When FooService.getData() is invoked it does something like:

    public Object getData() {
    Bar b = new Bar();
    return b.getMessage();
    }

    Now, the Bar object has a dependency on an object defined in my application context. Right now, the Bar class is manually getting the bean out of the context.

    How can I make this better so that my Bar object doesnt have to get the bean it needs and that the FooService can still get new Bar objects when it needs them??

  • #2
    think this is what i need:
    http://static.springframework.org/sp...thod-injection

    Comment

    Working...
    X