Results 1 to 6 of 6

Thread: Migrating application context configuration to Spring 3.1 and Hibernate 4.0

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    New York
    Posts
    17

    Default 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 at 07:44 AM.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,624

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Nov 2009
    Location
    New York
    Posts
    17

    Default

    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]

  4. #4
    Join Date
    Aug 2011
    Location
    Mexico City / Atlanta GA
    Posts
    30

    Default 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>


    Quote 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.
    ....
    ...

  5. #5
    Join Date
    Aug 2010
    Posts
    4

    Default

    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

  6. #6

    Default

    Hi,

    did you find any documentation on how to integrate them?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •