-->
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 in master/slave with ActiveMQ and Tomcat
PostPosted: Fri May 01, 2009 3:10 pm 
Newbie

Joined: Fri May 01, 2009 1:48 pm
Posts: 4
Hello,

according to Hibernate Search in Action book and https://www.hibernate.org/421.html, I'm trying to configure Hibernate Search in master/slave mode using ActiveMQ JMS provider and Tomcat servlet container (not using JBoss AS). Both master and slave are Tomcat instances running on different servers on network.

My questions are:

1. It looks like that all ActiveMQ stuff-ConnectionFactory, hibernatesearch queue and ActiveMQ broker is created and run only on master node. So slave doesn't need any ActiveMQ libraries in it's classpath and it's entirely independent on any JMS provider, right?

2. How can slave reach master's Connection factory object via JNDI? Slave needs the factory to reach hibernatesearch queue. In JBoss AS, the factory is exposed via
Code:
jnp://master:1099
on master, but Tomcat doesn't do it this way. So I don't know how should I set
Code:
hibernate.search.worker.jndi.url
property on slave.

Thank you for an answer.

Sincerely,

Jirka Hradil


Top
 Profile  
 
 Post subject: Re: Hibernate Search in master/slave with ActiveMQ and Tomcat
PostPosted: Thu May 14, 2009 5:34 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Quote:
1. It looks like that all ActiveMQ stuff-ConnectionFactory, hibernatesearch queue and ActiveMQ broker is created and run only on master node. So slave doesn't need any ActiveMQ libraries in it's classpath and it's entirely independent on any JMS provider, right?

You will need some JMS provider in the slave as well. Something has to implement the JMS interfaces. But in theory you could have a different provider in the slave even though that seems a little strange.

Quote:
2. How can slave reach master's Connection factory object via JNDI?

You can use the Resource configuration option as described in https://www.hibernate.org/421.html to setup the JNDI.
Code:
<!-- ActiveMQ ConnectionFactory -->   
    <Resource name="jms/ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory"
        description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        brokerURL="tcp://localhost:61616?trace=true" brokerName="LocalActiveMQBroker"/>

Of course you would have to adjust the host name.


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.