Announcement Announcement Module
Collapse
No announcement yet.
Providing a parent bean factory for DispatcherServlet Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Providing a parent bean factory for DispatcherServlet

    When using org.springframework.web.servlet.DispatcherServlet I am looking for a way to tell it that there is already a bean factory running that it should be aware of. DispatcherServlet should load its own config like it does today, but this web bean factory should also be able to refrence beans that are in the master (like a nestable bean factory would?) Is this an option?

    I need this because one small piece of my app is the web mvc items, at the point it gets loader there is already a beanFactory that all the master obejct (like DOA or Factories) are loaded in, but it does make 100% sence to keep the web specific stuff (like the mappings) in a special factory.

    I would assume I could extend DispatcherServlet and make something find a bean factory somewhere in the JVM using classloader and reflection, but seems like it would be a hack for something I am sure is a common issue.

    Thanks!

  • #2
    Hava a look at http://forum.springframework.org/showthread.php?t=10228, which may help.

    There's code there for an overridden DespatcherServlet which uses an existing ApplicationContext for its parent.
    Last edited by Rod Johnson; Jan 18th, 2006, 11:49 AM.

    Comment

    Working...
    X