-->
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 
Newbie

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"

"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">



<hibernate-configuration>



<session-factory>



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

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



<!-- SQL dialect -->

<property name="dialect">

org.hibernate.dialect.PostgreSQLDialect

</property>



<!-- 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">

JndiBoundTreeCacheInstance

</property>



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

<property name="transaction.factory_class">

org.hibernate.transaction.JTATransactionFactory

</property>



<!-- 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">

true

</property>



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

<property

name="cache.provider_configuration_file_resource_path">

jboss-cache.xml

</property>



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

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

org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory

</property>



<!-- Use query cache too -->

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



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

<property name="transaction.manager_lookup_class">

org.hibernate.transaction.TransactionManagerLookup

</property>



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

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

<event type="post-update">
<listener
class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-insert">
<listener
class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>
<event type="post-delete">
<listener
class="org.hibernate.search.event.FullTextIndexEventListener"/>
</event>




</session-factory>



</hibernate-configuration>



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">
<jta-data-source>java:xab2</jta-data-source>
<properties>
<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"
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.search.default.indexBase" value="/home/skuppusamy/Hibernate/Indexes"/>

</properties>
</persistence-unit>

</persistence>

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


Thanks in Advance,
Sorna.K


Top
 Profile  
 
 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
Quote:
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.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
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.