This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Hibernate Search In Action- Hibernate Search Event listeners ?

 
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 ]
 
author
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 ]
 
author
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
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
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!