I'm using amixture of Hibernate and JCA data sources in a project, and I'm looking at implementing some query functions to the Hibernate Data Source as read-only transactions. It looks to me like the HibernateTransactionManager will optimise things for me nicely setting the flush mode to FLUSH_NEVER, but unless I'm missing something this behaviour isn't available when using the JtaTransactionManager.
I've looked at extending HibernateDaoSupport to provide a second HibernateTemplate which is set to FLUSH_NEVER for read only dao methods, but I was wondering if anyone else has tried to handle this at all, and if I'm on approaching the problem the best way?
Cheers,
Andrew.


Reply With Quote