Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2458

Refactor DefaultHibernateConfigurer as an IOC service for easier overriding

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.0.13
    • 5.0.15
    • tapestry-hibernate
    • None

    Description

      when the DefaultHibernateConfigurer is calling configuration.configure() Hibernate will try to initialize the SessionFactory using a hibernate.cfg.xml file from the root classpath. there are two problems to this approach: 1) you always have to have a (dummy) hibernate.cfg.xml file in your root classpath and 2) you have to contribute another HibernateConfigurer ("after:Default") that will call configuration.configure("myhibernate.cfg.xml") to override the first call.

      Therefore i'd suggest to make the DefaultHibernateConfigurer exchangeable by defining it as IOC service. this would make it possible to define an own DefaultHibernateConfigurer using the Alias service.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            kristian Kristian Marinkovic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: