These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]

Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Search on Multi node clusters
PostPosted: Fri May 21, 2010 7:45 am 

Joined: Mon Mar 29, 2010 9:15 am
Posts: 14
Hi All,

Long after I am posting new topic.

After getting succeeded with hibernate search in an application, I need to enhance search to multi-node environment. (currently 4 nodes).

I am interested with shared index approach.(Not Master-Slave approach).

Can Anyone suggest me the configuration changes to be done to achieve this?

My current hibernate.cfg.xml:

<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC

"-//Hibernate/Hibernate Configuration DTD 3.0//EN"




<!-- JDBC connection pool (use the built-in) -->

<property name="connection.pool_size">1</property>

<!-- SQL dialect -->

<property name="dialect">



<!-- Enable Hibernate's automatic session context management -->

<property name="current_session_context_class">jta</property>

<!-- Enable the second-level cache -->

<!-- Provider is JBoss Cache -->

<!--<property name="cache.provider_class">org.jboss.hibernate.jbc.cacheprovider.JndiBoundTreeCacheProvider</property>-->

<property name="hibernate.cache.jndi">



<!-- Transaction factory that supports JTA -->

<property name="transaction.factory_class">



<!-- enable caching of entities and collections -->

<property name="cache.use_second_level_cache">true</property>

<!-- enable caching of query results -->

<property name="cache.use_query_cache">true</property>

<property name="cache.region.jbc2.query.localonly">



<!-- JBoss Cache configuration file name -->





<!-- To use JBoss Cache 2 as your Second Level Cache implementation -->

<property name="cache.region.factory_class">



<!-- Use query cache too -->

<property name="cache.use_query_cache">true</property>

<!-- JBoss Transactions Manager lookup class -->

<property name="transaction.manager_lookup_class">



<!-- Echo all executed SQL to stdout -->

<property name="show_sql">true</property>

<event type="post-update">
<event type="post-insert">
<event type="post-delete">



My current persistence.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<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/ ... ce_1_0.xsd"
version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">

<persistence-unit name="db1">
<property name="hibernate.ejb.cfgfile"
value="/META-INF/hibernate.cfg.xml" />
<property name="jboss.entity.manager.jndi.name"
value="persistence-units/apptivodb2" />
<property name="hibernate.ejb.event.post-insert"
<property name="hibernate.ejb.event.post-update"
<property name="hibernate.ejb.event.post-delete"
<property name="hibernate.search.default.indexBase" value="/home/skuppusamy/Hibernate/Indexes"/>



Please let me the configuration changes......

Thanks in Advance,

 Post subject: Re: Hibernate Search on Multi node clusters
PostPosted: Fri May 21, 2010 4:59 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
I am interested with shared index approach.(Not Master-Slave approach).

shared index is only reliable when both Hibernate Search indexes are on the same machine, as to properly share an index it has to be stored on a non-network-shared directory (real local filesystem).
For multi nodes you need Master-Slave.

BTW from your configuration files I guess you're using fairly old versions of Hibernate Search?

Also this is the wrong forum, please use the Hibernate Search forum.


Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.