Results 1 to 2 of 2

Thread: Providing a parent bean factory for DispatcherServlet

  1. #1
    Join Date
    Aug 2004
    Posts
    6

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default

    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 at 10:49 AM.
    Chris Harris
    Carlisle, UK

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. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Replies: 1
    Last Post: Jul 28th, 2005, 05:08 PM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

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