Hi,
Quote:
I have 2 applications one who send message on a jms queue called queue/FullDoc inside a JBoss 4_0_5 server and an other one (standalone) who is using hibernate search.
Are not both applications using Hibernate Search? You need at least one master, which is responsible for indexing and sharing out the index to the slave instances. The master application is the one which needs a message listener, speak MDBSearchController. This controller will be called for each index request from one of the slaves.
Then there are of course the salves. There has to be at least one.
Last but not least you need a message broker, speak JMS queue. In your case you are using the messaging services from JBoss.
Quote:
In the second one I have this class:
public class MDBSearchController extends AbstractJMSHibernateSearchController
implements MessageListener {
...
And how do you make this class a consumer of the JMS queue? You will have somehow register the listener. In the example in the online doc (
http://www.hibernate.org/hib_docs/search/reference/en/html_single/#jms-backend)
Code:
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="queue/hiebrnatesearch"),
@ActivationConfigProperty(propertyName="DLQMaxResent", propertyValue="1")
} )
is used. This is of course only working within a J2EE container. If you run standalone you will have to register your listener. Have a look at this
http://hibernate.org/421.html.
Regarding your config file it seems you are mixing properties from master and slave configurations. Really you should have two hibernate configuration files. One for the master and one for the slave.
I hope this helps.
--Hardy