Announcement Announcement Module
Collapse
No announcement yet.
difference between all of these different XML files Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • difference between all of these different XML files

    I am working on a web app with Spring and really like what it offers. I am still a little fuzzy about what the difference between all of the different xml files that spring uses:
    beans.xml
    appName-servlet.xml
    applicationContext.xml

    it seems like you can make references to your beans in all of these, so what are these intended for? Does it have to do with the scope of the beans?

    thanks a lot
    Ryan

  • #2
    Anything of the pattern *-servlet.xml is usually intended to hold web specific beans (e.g. controllers, URL mapping handlers, remoting beans etc.).

    Generally, everything else is just split for modularity: possibly to make it more readable or to assist integration testing. Can't see how your example is split without viewing the contents. If you tak a look at the JPetStore sample, you can see a dataAccessContext-jta.xml and a dataAccessContext-local.xml - these have been separated so you can easily swap between JTA and local transactions.

    Comment


    • #3
      cool thanks a lot

      Ryan

      Comment

      Working...
      X