-
Dec 10th, 2010, 03:03 AM
#1
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
-
Dec 17th, 2010, 01:03 AM
#2
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.
-
Dec 17th, 2010, 02:14 AM
#3
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
-
Forum Rules