4 Replies Latest reply on Jun 29, 2006 11:55 AM by Sebastian Menge

    Lucene index on Entity beans problem

    Louis Coetzee Apprentice


      According to the Hibernate Annotation documentation a person can use an Annotation (@Indexed) to mark a domain object as indexable and have Hibernate maintain the Lucene index (p38 of hibernate_annotations.pdf).

      public class LuceneExampleData implements Serializable {
       @Id(generate = GeneratorType.AUTO)
       public Long getId() {
       return id;
       public String getMessage() {
       return message;

      I have tried to configure my hibernate.cfg.xml as suggested and have added the various annotations to my entity. Unfortunately it appears as if the Listener methods never gets executed.

       <listener type="post-commit-update" class="org.hibernate.lucene.event.LuceneEventListener"/>
       <listener type="post-commit-insert" class="org.hibernate.lucene.event.LuceneEventListener"/>
       <listener type="post-commit-delete" class="org.hibernate.lucene.event.LuceneEventListener"/>
       <event type="post-commit-update">
       <listener class="org.hibernate.lucene.event.LuceneEventListener"/>
       <event type="post-commit-insert">
       <listener class="org.hibernate.lucene.event.LuceneEventListener"/>
       <event type="post-commit-delete">
       <listener class="org.hibernate.lucene.event.LuceneEventListener"/>

      I am using jboss 4.0.3 installed with ejb3 with my application using Seam.

      I have tried to increase my log level in server/default/conf/log4j.xml (as shown below) to hopefully see the events, unfortunately no go.

      <category name="org.hibernate.lucene">
       <priority value="TRACE" class="org.jboss.logging.XLevel"/>

      Any suggestions ?