Announcement Announcement Module
Collapse
No announcement yet.
Migrating application context configuration to Spring 3.1 and Hibernate 4.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrating application context configuration to Spring 3.1 and Hibernate 4.0

    I'm having hard time finding migration docs. I was using sping 3.0.5 and hibernate 3.4.

    I migrated to the latest release candidates: spring 3.1 and hibernate 4.0

    I was able to refactor my classes without problem but the application context for hibernate is giving me problems since I have not see any examples on how to configure it.

    Speficicly:
    Code:
    <bean id="sessionFactory"    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="mappingResources">
            <list>...</list>
       </property>
        <property name="hibernateProperties">
            <props>
              ... 
              <prop key="hibernate.connection.provider_class">org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider</prop>
              <prop key="hibernate.cache.provider_class">????</prop>
              ...
            </props>
        </property>
    </bean>
    Apparently properties dataSource , mappingResources and hibernateProperties no longer exist and I'm not so sure about what to put in hibernate.connection.provider_class and hibernate.cache.provider_class.
    Last edited by momatej; Oct 10th, 2011, 07:44 AM.

  • #2
    Please use code tags when posting code that way it remains readable.

    Hibernate 4 isn't yet supported (it isn't final yet) but support is under way (judging from the latest commits in the spring 3.1 repo).

    Comment


    • #3
      Thank you Marten. I guess I'll just sit back wait for little bit

      Hibernate 4 isn't yet supported (it isn't final yet) but support is under way (judging from the latest commits in the spring 3.1 repo).[/QUOTE]

      Comment


      • #4
        Upgrading to hibernate4.LocalSessionFactoryBean is not working yet

        I am having the same problem even though I just have updated from org.springframework.orm.hibernate3.LocalSessionFac toryBean to org.springframework.orm.hibernate4.LocalSessionFac toryBean.

        From:

        Code:
        <bean id="sessionFactory"    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
            <property name="dataSource" ref="dataSource"/>
            ...
        </bean>
        To:

        Code:
        <bean id="sessionFactory"    class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
            <property name="dataSource" ref="dataSource"/>
            ...
        </bean>


        Originally posted by momatej View Post
        I'm having hard time finding migration docs. I was using sping 3.0.5 and hibernate 3.4.
        ....
        ...

        Comment


        • #5
          Hi, I read that Hibernate 4 is now supported in spring 3.1.1, where can I find a configuration example?, I have several Spring 3 + Hibernate 3 applications but I donīt know how to start the migration. Thanks in advance

          Comment


          • #6
            Hi,

            did you find any documentation on how to integrate them?

            Comment

            Working...
            X