Results 1 to 3 of 3

Thread: Using applicationContext.xml from jar

  1. #1

    Default Using applicationContext.xml from jar

    Hi,
    In my project I want to have a core module (with all services, daos, hibernate mappings, etc) and several front-ends (a web front-end, REST, maybe even a scala REPL front-end for administration).

    In my web front-end I want to continue to use Spring for all Spring goodness, and I need to access the services made available from the core module.

    So my question is: Should I name the core's main application context file something like applicationContext-core.xml and then import that from the web module's applicationContext.xml? Or should I use some other type of configuration?

    I also wanted to see if I'm going down the wrong road here with this idea, and if there are any suggestions/improvements..

    Thanks in advance,
    Dale

  2. #2
    Join Date
    Jan 2009
    Location
    Pune
    Posts
    58

    Default

    Refer the spring doc, you'll get the answer.
    Use "Classpath:applicationContext*" or might be little bit diffrent but using this one you can refer the applicationContext file from your class path.

  3. #3
    Join Date
    Jul 2010
    Location
    Venice, Italy
    Posts
    709

    Default

    Load your unique core application context using listener that points to the same file in all web.xmls of all the application. Then, for each distinct application, load its web context through servlet. This way, all your separate web contexts will have access to the core application context, as they will be children of that context.

Posting Permissions

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