Announcement Announcement Module
Collapse
No announcement yet.
JPA and SimpleJdbcTemplate in same transaction Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JPA and SimpleJdbcTemplate in same transaction

    Hi,

    I have an application which has different data access strategies:

    JPA via @PersistenceContext and SimpleJdbcTemplate.

    Now I need so make a call into a JPA-DAO and into a SimpleJdbcTemplate-DAO in the same transaction.

    How can this be done? May JPATemplate instead of SimpleJdbcTemplate be the solution?

    I use:

    org.apache.commons.dbcp.BasicDataSource
    org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean
    org.springframework.orm.jpa.JpaTransactionManager
    org.springframework.orm.jpa.support.PersistenceAnn otationBeanPostProcessor
    tx:annotation-driven

    Thank you
Working...
X