[JBoss] Infinispan/hibernate 2nd level cache update not transactional?

Discussão em 'StackOverflow' iniciado por Stack, Agosto 31, 2021.

  1. Stack

    Stack Membro Participativo

    Infinispan as hibernate 2nd level cache isn't updating in a transactional manner similar to how a database transaction works. By this I mean, a database transaction is not visible to other transactions until completely committed. Based on logging, I've observed transactions (JEE MDB) being able to partial updates of a given Infinispan update. To elaborate, here's my setup:

    1. Jboss
    2. JPA (hibernate)
    3. Infinispan as the 2nd level cache provider (local cache transaction mode FULL_XA.
    4. JTA is enabled.
    5. Database is setup as a XA datasource

    What I appear to have seen is that if a JEE bean is started post the DB commit of a transaction and what I believe to be the infinispan update (commit), it can see some of the infinispan update (which isn't how a database transaction work and is undesirable.) Please help.

    Also, please confirm that 1) Second level cache only gets updated on transaction commit. 2) I'm not totally crazy in thinking that the update should be atomic to other transactions... either they see none of it or all of it.

    Continue reading...

Compartilhe esta Página