I have the following setup:
- JPA (2.0) via Hibernate (4.1)
- Infinispan as a second level cache (5.1)
- Hibernate Search related to Hibernate (4.1)
- Infinispan as a hibernation search directory (Lucene)
- JDBC Cache Server Connected for Infinispan Directory
- PostgreSQL database (9.1) for storing both objects and the Lucene directory.
- Bitronix (2.1.2) as a Transaction Manager
- I do not use Java EE, but Spring (3.1)
Infinispan as a second level cache is fine, no recovery is required, and you can read the changes in your own transaction due to the nature of the cache.
After reading hours of reading the source code, when I update Entity, Hibernate Search does not update the Lucene directory, but at the end of the transaction (if it commits), so I wanted to search for the text I just updated inside the same transaction, unless I can i?
But in addition, Hibernate Search updates the directory in another thread after the transaction is completed. So, if one of the Directory updates fails, will Lucene be incompatible with my entities? And if something happened before the updates were sent to the directory and restoration was required, will these updates be lost?
, "" , Infinispan Directory. . ? Lucene JMS. , , JMS .
Infinispan , CacheStore . , - jcbc CacheStore, , Infinispan Memory Directory .
, , , (XA), ? , .