Is there a way for getting and using an existing (open) transaction ?
I have an application using JPA/Hibernate that inserts some data. Within the session (and so the transaction), I want to generate some jasper reports from another server. Ja开发者_开发百科sper report uses its own query for getting data. But needed data are not yet commited.
So that's why I want jasper server get the transaction opened by JPA/Hibernate (with an id by example ?).
Thanks !
You need to change the connection's transaction isolation level to one of the values described here.
In Hibernate this is done in the session configuration by specifying a hibernate.connection.isolation
as described here.
精彩评论