• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Search In Action- Hibernate Search Event listeners ?

 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this the correct way to configure Search Listeners in the config file or do we have to manually configure them, if we decide not to use Hibernate Annotations?



[ Edited to use code tags - Paul Sturrock ]
[ December 09, 2008: Message edited by: Paul Sturrock ]
 
John Griffin
author
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct. Here is the full configuration:

[ December 09, 2008: Message edited by: John Griffin ]
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is only useful if you do NOT use Hibernate Annotations or Hibernate EntityManager (but then why oh why ).

If you use hibernate Annotations, you do not need to configure the event listeners, they are registered for you transparently.
 
Dinesh Sundrani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Emmanuel and John

I wish we had a shorter version of the xml configuration of somethign like this, rather than to repeat the redundant information - each tag, every time.
 
Emmanuel Bernard
author
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hum interesting. There are a few problems with the approach you propose (esp if you need more than one listener per event) but open a JIRA issue, we will tink about it over there.

But clearly the best approach is to use Hibernate Annotations, you have 0 event configuration
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic