Quantcast
Channel: Active questions tagged propagation - Stack Overflow
Viewing all articles
Browse latest Browse all 52

"@Transactional(readonly=true, propagation=Propagation.REQUIRED)" Is it possible to set it up?

$
0
0

Currently, I am using the postgresql master/slave environment.The development environment is spring boot.

I'd like to organize the transaction as follows:

TX Begin    @Transactional (readOnly=false)      insert into t1 values(1);   @Transactional (readOnly=true, propagation=Propagation.NESTED) or    @Transactional (readOnly=true, propagation=Propagation.REQUIRED)      select * from t1 where c1=1;    commit;TX End;

In the above case, is it possible to read the records from the Replica (Slave) server without having to commit after INSERT?

Thanks.


Viewing all articles
Browse latest Browse all 52

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>