• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hibernate Search In Action- Hibernate Search Event listeners ?

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are correct. Here is the full configuration:

[ December 09, 2008: Message edited by: John Griffin ]
 
author
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic