Announcement Announcement Module
Collapse
No announcement yet.
How to configure in JBoss 4.0 for using Spring/Hibernate? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to configure in JBoss 4.0 for using Spring/Hibernate?

    I am new to Spring. Could somebody tell me how to configure JBoss to run Spring (with Hibernate) for data access? Where shoud I put the applicationContext.xml file? If you can point me to some tutorial on the detail set up of Spring in JBoss, I'd greatly appreciate it.

    Thanks.

    Lilly

  • #2
    Lilly,

    There should be no setup details that are specific to JBoss. If you are building a web application you simply deploy your applicationContext.xml somewhere in your application (WEB-INF or the classpath usually) and load it using either ContextLoaderServlet or ContextLoaderListener (preferred).

    You can find more details for this in the reference manual under Spring MVC.

    Rob

    Comment


    • #3
      Portability between containers is a major Spring benefit. You should not need to use JBoss-specific configuration. Look at the PetClinic sample application for an illustration of Hibernate configuration, using Spring's LocalSessionFactoryBean, that will run in any J2EE container--or in a pure web container such as Hibernate or a standalone application.

      Comment


      • #4
        Thanks

        Thanks. I solved the problem.

        Lilly

        Comment

        Working...
        X