Results 1 to 1 of 1

Thread: JpaTransactionManager and underlying Connection Object

  1. #1
    Join Date
    Aug 2010
    Posts
    1

    Default JpaTransactionManager underlying Connection Object-JPA+Spring+Hibernate Entity Mgr

    We are using Spring's JpaTransactionManager for declarative transaction management in a Spring + Hibernate + JPA environment. The connection pooling is done with Apache DBCP.

    We need a set a attribute on the underlying connection object. I have a couple of questions:

    1. Does JpaTransactionManager use the same underlying Connection during the course of a transaction (with several updates/deletes). i.e. if i set a attribute initially on the connection, I don't have to worry about it in the subsequent updates/deletes.

    2. To set the attribute, we need access to the underlying Connection that the transaction manager uses. Is there a smart way to do it (using JpaDialect etc..). Any sample code would be appreciated.

    Thanks in advance.
    Last edited by GottaKnow; Aug 5th, 2010 at 11:18 AM. Reason: Needed to Add JPA + Spring in the Header for Clarity

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •