The PAP code was complicated a fair amount by the lack of control over transactions. PAP had to cache all of its DB updates and write them all at once. Even so, without transactions, that still leaves the possibility of a deploy/undeploy operation being partially written to the DB. Furthermore, because of the need to cache the updates, every query had to consider the cache, in addition to checking the DB and, as there were multiple ways of querying the same data (e.g., with and without versions, different policy types), it was too easy to overlook cases where the cache needed to be considered. For that matter, JPA already provides caching, but the PAP code couldn't take advantage of it.
- duplicates
-
POLICY-1837 Review transaction boundaries of models
- Closed