Announcement Announcement Module
Collapse
No announcement yet.
Context heirarchies within a webapp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Context heirarchies within a webapp

    We have our application broken into three layers:

    domain (database beans)
    common (services)
    webapp (tapestry components and pages)

    each of which is a maven project. I'd like to be able to have each layer bundle an applicationContext-<name>.xml within its own jar so that the wiring is automatically picked up. So within domain.jar, you would have an applicationContext-domain.xml, etc. Finally you would have an applicationContext-webapp.xml in WEB-INF/classes. According to the docs, I can specify the various applicationContexts to use in the web.xml but they must be files. Is there a way to use the classpath instead?

  • #2
    Is there a way to use the classpath instead?
    Yes, you can use Spring's resource location abstraction. Simply use locations of the form
    Code:
    classpath&#58;com/mycompany/mypackage/test-datasource.xml

    Comment

    Working...
    X