Announcement Announcement Module
Collapse
No announcement yet.
analog to HibernateInterceptor for jdbc? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • analog to HibernateInterceptor for jdbc?

    On my last project I declared the HibernateInterceptor for all DAO objects. If I'd been Spring-enabling an app from scratch I might've used the HibernateTemplate, but the HibernateInterceptor was much easier to use on a project where Spring was brought in midstream.

    Now I'm Spring-enabling an app that uses straight jdbc, and I haven't found a JdbcInterceptor. Is there some other interceptor that provides a declarative alternative to JdbcTemplate? (I realize I could just inject each DAO with a HibernateFactory and then get the connection from there, but that's pretty ugly. I'd also rather not write my own interceptor if there's already a standard one in existence.)

    -Chuck

  • #2
    Take a look at the TransactionAwareDataSourceProxy. It allows classic JDBC code to participate in Spring-managed transactions. You can then mix and match older code with newer JdbcTemplate based code.

    Comment

    Working...
    X