开发者

Join open postgresql transaction

开发者 https://www.devze.com 2023-03-24 06:59 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号