Announcement Announcement Module
Collapse
No announcement yet.
Configuring transaction manager/EMF using Java config Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring transaction manager/EMF using Java config

    Hi all,

    Any examples of how to configure something like the following using Spring Java configurations? Have been playing with this for a while, but can't quite get things wired up correctly.

    Code:
        <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
            <property name="dataSource" ref="dataSource"/>
            <property name="jpaVendorAdapter">
                <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
                    <property name="showSql" value="false"/>
                    <property name="generateDdl" value="true"/>
                </bean>
            </property>
        </bean>
    
        <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
            <property name="entityManagerFactory" ref="entityManagerFactory"/>
        </bean>
    The EMF is easy enough to code, but I'm struggling with how to get a transaction manager to reference it. Any help/examples would be appreciated.

  • #2
    Got it...

    http://forum.springsource.org/showthread.php?t=72826

    Comment

    Working...
    X