Hi,

I'm new to Spring/Hibernate, yet managed to use it very fast, however I encountered the following problem.

I'm writing a plugin inside an application that already use Hibernate+Spring. My plugin seems to be executing inside a spring/hibernate transaction, but my plugin is not interested in being part of that transaction. My plugin even access a different DB.

My plugin code loads classes with data from the DB, then format the loaded objects in memory some more and then display them. Nothing more than that. The formatting must not go back to the DB.

However, I see that after my code is done, the changes I do in memory are written back to the DB. Seems this is due to the external transaction that was alreay open.

I use the simplest usage of HibernateTemplate for DAO, LocalSessionFactoryBean & the DAO beans declared in the Context.xml.

I couldn't find how to get my code to run independently of the global transaction which is not under my control, or how to prevent my changes from going back to the DB any other way (other than not doing the memory manipulation inside the hibernated classes). When I debugged the code it seemed to me I can't control that.

Can anyone help?

Thanks in advance.
Yaniv