[hibernate-dev] Hibernate Search 421
Amin Mohammed-Coleman
aminmc at gmail.com
Tue Mar 16 15:18:50 EDT 2010
Hi folks,
I've removed the enum singleton and created a class(BackendExceptionHandler) which has 2 methods:
public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler(SearchConfiguration configuration);
public boolean logException(SearchConfiguration configuration)
The issue that I'm looking at is getting the search configuration to the methods. In order to get the SearchConfiguration to the methods defined in BackendExceptionHandler, I have to thread SearchFactoryImplementor.
Using this approach I will have to define a method to get the search configuration from the SearchFactoryImplementor. I'm guess this isn't the best approach as this requires a significant change. I don't know what peoples thoughts are on this. I'm looking to set the BackendExceptionHandler up when the SearchFactory is created and then use it. Is there any currently approach that does something similar?
Thanks for your patience with this one.
Cheers
Amin
On 9 Mar 2010, at 13:00, Amin Mohammed-Coleman wrote:
> Hi Sanne
>
> You are right and Im not happy with the enum class. I wanted to have a single configuration that was available on the creation of the search factory and re use when required. I'll take a look at changing that with a better solution.
>
> Cheers
>
> Amin
>
> Sent from my iPhone
>
> On 9 Mar 2010, at 12:47, Sanne Grinovero <sanne.grinovero at gmail.com> wrote:
>
>> yes that is it;
>> There has been some talking about other strategies as well on previous
>> mails, like jms, but that lead to nowhere so yes I'm suggesting now to
>> forget about other default implementations at the moment and proceed
>> as you just said.
>>
>> 2010/3/9 Emmanuel Bernard <emmanuel at hibernate.org>:
>>> I thought the goal was to have something pluggable with two default impls (exception and log). If that's what you are describing I am ok, if not, then I don't understand ;)
>>>
>>> On 9 mars 2010, at 12:08, Sanne Grinovero wrote:
>>>
>>>> Emmanuel are you ok with this if we either log or rethrow the
>>>> exception back to application code? jms et al looks complex and I
>>>> don't see the benefit.
>>>
>>>
More information about the hibernate-dev
mailing list