title: How to perform Spring LDAP and JPA transactions
body: <p>I prefer using JPA Entitymanager factory obtain via LocalContainerEntityManagerFactoryBean for persistence.
  But I hit the wall when I want to support transaction between spring ldap and JPA. My service layer is calling both LDAP dao and JPA dao.
  spring ldap has ContextSourceAndHibernateTransactionManager which requires sessionFactory 
  and it doesn't have ContextSourceAndJPATransactionManager
  When I use ContextSourceAndDataSourceTransactionManager with the same datasource configured for LocalContainerEntityManagerFactoryBean, it doesn't even persist a record!</p>
  
  <p>I am not sure if I can use JTATransactionManager as LDAP is not XA capable.</p>
  
  <p>My interim solution is to use JPATransactionManager on DAO layer and use LDAPTransactionManager on service layer. And make sure that JPA DAO is called last in service layer.</p>
  
  <p>I can provide code fragments if you want.
  Thanks</p>