Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] EclipseLink & Spring

We are using spring with eclipselink and it works like charm. Spring has comprehensive support for eclipselink. Here are couple of example you may want to take a look at.

http://blog.springsource.com/2006/05/30/getting-started-with-jpa-in-spring-20/
http://wiki.eclipse.org/EclipseLink/Examples/JPA/JPASpring#Step_2:_Modify_your_Spring_Application_Context_XML

The application context example taken from my project is pasted below.

    <bean id="entityManagerFactory"
        class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="persistenceUnitManager"
            ref="persistenceUnitManager" />
        <property name="persistenceUnitName"
            value="[PU name defined in persistence.xml]" />
        <property name="dataSource" ref="[data source defined as spring bean]" />
        <property name="loadTimeWeaver">
            <bean
                class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver" />
        </property>
        <property name="jpaVendorAdapter">
            <bean
                class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
                <property name="databasePlatform" value="oracle" />
                <property name="generateDdl" value="false"/>
                <property name="showSql" value="true" />
            </bean>
        </property>
    </bean>

HTH,
Shashi

-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Roger
Sent: Saturday, April 24, 2010 3:43 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] EclipseLink & Spring

I would be extremely grateful if someone could post (or point me to an
example) a spring applicationContext.xml that uses EclipseLink as the JPA
provider that actually works! Examples that I've found to date all seem to set
it up differently and I'm tearing my hair out at the moment.

Regards
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top