[hibernate-dev] H.Search: EventListenerRegister

Sanne Grinovero sanne.grinovero at gmail.com
Thu Aug 28 07:43:53 EDT 2008


I closed the issue using class equality, it just seemed the best
solution basing on your feedback.
People making their own extensions should know how to configure
listeners correctly anyway.
If you don't agree, reopen it: HSEARCH-253

thanks for all the help,

Sanne

2008/8/27 Emmanuel Bernard <emmanuel at hibernate.org>:
> I don't quite fully remember the reasoning for not using isAssignableFrom
> unfortunately. I guess I envisioned people subclassing the regular event
> listener to do whatever and I did not wanted to be impacted by their work.
> But then it would make sense to consider them as registered as they are
> subclasses... Anyway, it's better to prevent subclassing in the first place
> (final). We will be able to do that when the collection listener will be
> removed (let's set a TODO).
>
> PostCollectionUpdateEventListener is an oversight (I swear I fixed that at
> some point).
>
> Your code looks good.
>
> --
> Emmanuel Bernard
> http://in.relation.to/Bloggers/Emmanuel | http://blog.emmanuelbernard.com |
> http://twitter.com/emmanuelbernard
> Hibernate Search in Action (http://is.gd/Dl1)
>
> On  Aug 25, 2008, at 13:48, Sanne Grinovero wrote:
>
>> 2008/8/25 Hardy Ferentschik <hibernate at ferentschik.de>:
>>>
>>> On Sat, 23 Aug 2008 19:25:35 +0200, Sanne Grinovero
>>> <sanne.grinovero at gmail.com> wrote:
>>>
>>>> Hello Hardy,
>>>> thanks for your attention, I'll attach my current version (absolutely
>>>> untested) just to give the idea.
>>>> If you look at the current trunk the last listener handling
>>>> (PostCollectionUpdateEventListener)
>>>> is not consistent with the others; I thought it was "suspect",
>>>> but forgot to mention it in my previous post.
>>>
>>> Your code seems to be a step into the right direction and a good exaple
>>> for
>>> the use of generics. Personally, I would use explicit if statements
>>> insead
>>> of the ?: operator, but that's a matter of taste.
>>>
>>> --Hardy
>>
>> yes I agree, I'll simplify the ?: operator away; this was just an
>> intermediate step for cleanup.
>> Still I'm needing your opinion about
>>
>> A) the latest method "isPresentInListeners";
>> especially because the current code isn't checking
>> all listeners the same way, I suppose because you merged the now
>> deprecated
>> FullTextIndexCollectionEventListener with the FullTextIndexEventListener.
>> I'd use isAssignableFrom, but there's a comment there explicitly telling
>> me
>> not to do.
>>
>> B) I'm writing a trivial test, is there any special configuration to test
>> for?
>>
>> Sanne
>
>



More information about the hibernate-dev mailing list