-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Extends FullTextIndexEventListener
PostPosted: Thu Jul 26, 2012 5:24 am 
Newbie

Joined: Fri Jul 20, 2012 10:19 am
Posts: 7
Hi,

I tried to replace the FullTextIndexEventListener with my custom listener. I first used a duplication strategy to avoid the registration of FullTextIndexEventListener.
The following code in ContextHelper is problematic because my custom listener need to extends the FullTextIndexEventListener :
Code:
                //FIXME this sucks since we mandate the event listener use
      for ( PostInsertEventListener candidate : listeners ) {
         if ( candidate instanceof FullTextIndexEventListener ) {
            listener = (FullTextIndexEventListener) candidate;
            break;
         }
      }


The code comment below scare me because my code will soon break :
Code:
//TODO make this class final as soon as FullTextIndexCollectionEventListener is removed.
public class FullTextIndexEventListener


Can you give me the right direction to take to be compatible with the future version of Hibernate ?

Thanks,
Guillaume.


Top
 Profile  
 
 Post subject: Re: Extends FullTextIndexEventListener
PostPosted: Thu Aug 09, 2012 4:27 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Guillaume,
could you explain why you need to extend the FullTextIndexEventListener?

As you have seen from the comment we would like to make it final to cleanup several code areas, but to be fair that comment has been there for long and we never actually did it as we want to make sure all use cases are covered in some way.

Since we introduced conditional indexing [1] I thought we have all use cases covered, so please tell us what you need to do?

1 - http://in.relation.to/Bloggers/HibernateSearch410FinalConditionalIndexingAndMore

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Extends FullTextIndexEventListener
PostPosted: Mon Aug 13, 2012 2:42 am 
Newbie

Joined: Mon Aug 13, 2012 2:40 am
Posts: 1
Thank you for this article.Really impressed! Everything is very, very clear, open is a description of the problem. It contains the information.


Top
 Profile  
 
 Post subject: Re: Extends FullTextIndexEventListener
PostPosted: Fri Sep 14, 2012 4:43 pm 
Newbie

Joined: Fri Jul 20, 2012 10:19 am
Posts: 7
Sorry for the late reply and thanks for the link.
We're using custom event listener because in our context non-indexed entity must trigger reindexing.
Example :
Code:
Customer {
String name;
}
@Indexed
Invoice {
String number;
Long customerId;
}


If the customer name changed we need to reindex the "Invoice index" which contains the customer name. We work on a SOA architecture with separated databases (so no direct reference between Invoice and Customer).
We're using Lucene to bridge/aggregate our data but I think this is not the best use of this technology maybe a data grid/nosql solution will be more suitable...

Guillaume.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.