Este contenido no está disponible en el idioma seleccionado.
3.5.2. Master node
Every index update operation is taken from a JMS queue and executed. The master index is copied on a regular basis.
Example 3.7. JMS Master configuration
The refresh period should be higher than the expected time copy.
In addition to the Hibernate Search framework configuration, a Message Driven Bean should be written and set up to process the index works queue through JMS.
Example 3.8. Message Driven Bean processing the indexing queue
This example inherits from the abstract JMS controller class available in the Hibernate Search source code and implements a JavaEE 5 MDB. This implementation is given as an example and, while most likely be more complex, can be adjusted to make use of non Java EE Message Driven Beans. For more information about the
getSession()
and cleanSessionIfNeeded()
, please check AbstractJMSHibernateSearchController
's javadoc.