Hibernate search FSSlaveDirectoryProvider not working
tvictor Nov 2, 2012 6:30 PMI am trying to share the lucene hibernate search indexes between 2 app servers.
I have done the configuration documented in the reference guide. But it does not seem to be working.
My 2 app servers can write to indexes. These needs to be synchronized periodically.
For the master my persistence.xml is like this
<properties>
<property name="hibernate.dialect" value="com.imagitek.prodagioap.persistence.SQLServer2008Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/prodagioAPEntityManagerFactory"/>
<property name="hibernate.search.default.sourceBase" value="\\VICTOR\indexes-master"/>
<property name="hibernate.search.default.indexBase" value="/ProdagioSoftware/prodagioIndexes"/>
<property name="hibernate.search.default.refresh" value="300"/>
<property name="hibernate.search.default.directory_provider" value="org.hibernate.search.store.FSMasterDirectoryProvider"/>
<property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.flush-entity" value="com.imagitek.prodagioap.persistence.ProdagioFlushEntityEventListener"/>
<property name="hibernate.default_batch_fetch_size" value="20" />
<property name="hibernate.ejb.interceptor" value="com.imagitek.prodagioap.persistence.AuditInterceptor" />
</properties>
For slave the persistence.xml is given below
<properties>
<property name="hibernate.dialect" value="com.imagitek.prodagioap.persistence.SQLServer2008Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql" value="true"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/prodagioAPEntityManagerFactory"/>
<property name="hibernate.search.default.sourceBase" value="/ProdagioSoftware/indexes-master"/>
<property name="hibernate.search.default.indexBase" value="/ProdagioSoftware/prodagioIndexes"/>
<property name="hibernate.search.default.refresh" value="300"/>
<property name="hibernate.search.default.directory_provider" value="org.hibernate.search.store.FSSlaveDirectoryProvider"/>
<property name="hibernate.search.worker.backend" value="jms"/>
<property name="hibernate.search.worker.jms.connection_factory" value="/ConnectionFactory"/>
<property name="hibernate.search.worker.jms.queue" value="queue/hibernatesearch"/>
<property name="hibernate.ejb.event.post-insert" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.post-update" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.post-delete" value="org.hibernate.search.event.FullTextIndexEventListener"/>
<property name="hibernate.ejb.event.flush-entity" value="com.imagitek.prodagioap.persistence.ProdagioFlushEntityEventListener"/>
<property name="hibernate.default_batch_fetch_size" value="20" />
<property name="hibernate.ejb.interceptor" value="com.imagitek.prodagioap.persistence.AuditInterceptor" />
</properties>
</persistence-unit>
Master is updating the local indexes. Slave is not even updating its local indexes. That is the issue I am facing. Please help?