Spring + Hibernate TransactionManager

Hi all,

I’m currently write an application which use Spring + Hibernate + vaadin. Currently we are using the container managed transactions (via HibernateTransactionManager and @Transactional annotation). This worked fine before but now with vaadin I wonder how I would handle the Transaction stuff.

From the wiki I see that it suggest to addTransactionListener to vaadin to handle this. I wonder if this will also allow me to use lazy feetching in hibernate too. And how would I bind a new Session to the Thread with this setup ? I’m right to think that I have to roll my own binding Code, because I can’t use the Container Transaction stuff ?

Thx,
Norman

Ps: I had a look at OpenSessionInView filter which is included in Spring but it seems that this will not work with vaadin because of its Statefulness.

Ok I seems to have fixed my problem with coding my Spring specifc SessionBinding stuff. I will post the code after I had some time to cleanup (just in case its usefull to anyone)

Bye,
Norman

I think, what you seek I’ve mentioned in
this topic
. I wonder, how you deal with managing
HibernateSessionFactory
in your Vaadin application (where do you keep a reference to it)?