Joined: Thu Jan 29, 2015 10:52 am Posts: 2
|
We have successfully integrated the hibernate search with our Play application, working on a single server. We ran into issues moving to a multiple app server environment with handling the index files synced between the servers. After some research we decided to implement a JMS Master-Slave queue setup.
We have activeMQ running to accept tcp traffic on port 61616. The issue we are running into is configuring our apps to connect to the JMS queue.
Our app server is configured as follows:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <non-jta-data-source>DefaultDS</non-jta-data-source> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> <property name="hibernate.hbm2ddl.auto" value="update" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.format_sql" value="true" /> <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.DefaultComponentSafeNamingStrategy" /> <property name="hibernate.default_batch_fetch_size" value="400" /> <property name="hibernate.search.default.directory_provider" value="filesystem"/> <property name="hibernate.search.default.indexBase" value="/var/lucene/indexes" /> <property name="hibernate.search.default.sourceBase" value="/var/lucene/source" />
<property name="hibernate.search.worker.backend" value="jms" /> <property name="hibernate.search.worker.jndi.class" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" /> <property name="hibernate.search.worker.jndi.url" value="tcp://{$server}:61616" /> <property name="hibernate.search.worker.jms.queue" value="java:comp/env/queue/hibernatesearch" /> <property name="hibernate.search.default.refresh" value="1800" /> <property name="hibernate.search.worker.jms.connection_factory" value="java:comp/env/jms/ConnectionFactory" /> </properties> </persistence-unit>
Has anyone had experience running JMS with the play framework? Any insight will be helpful. Thank you in advance.
|
|