Does anyone have any idea how to wire together a jpa transaction with a spring ldap transaction? I see that spring ldap provide the ContextSourceAndDataSourceTransactionManager for wiring my ldap context source and my datasource, but this doesn't seem to apply to jpa. below is part of my app context
any help would be greatly appreciated.Code:.... <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="persistentUnit"/> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="database" value="ORACLE"/> <property name="showSql" value="true" /> <property name="generateDdl" value="false" /> </bean> </property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="url" value="jdbc:oracle:thin:@111.11.11.111:1521/dbschema"/> <property name="username" value="username"/> <property name="password" value="xxxxxxx"/> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="url" value="ldap://ldapSvr:139012" /> <property name="userDn" value="cn=Directory Manager" /> <property name="password" value="xxxxxx" /> </bean> <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate"> <constructor-arg ref="contextSource" /> </bean> .....
cheers...


Reply With Quote
ort]/[database] [?propertyName1][=propertyValue1][&propertyName2][=propertyValue2] -->