dev@glassfish.java.net

Re: patch for issue #7522 - exceptions thrown from getInvalidConnections method are not logged

From: Dies Koper <diesk_at_fast.au.fujitsu.com>
Date: Thu, 27 Aug 2009 13:53:35 +1000

Hi Shalini,

EJB Timer call-back methods, Servlet's doGet and doPost methods etc.
also do not throw RuntimeException exceptions by contract, but when a
bug in user code leads to a RuntimeException being thrown, the container
logs them.
Why make an exception for resource adapters? Shouldn't the administrator
know that something is going wrong in the resource adapter so that (s)he
can notify the resource adapter provider?

Thanks,
Dies


Shalini Muthukrishnan wrote:
> Hi Dies,
>
> In your fix, please do not catch Exception, as the resource adapter as
> per contract throws only ResourceException. So the first part is fine.
>
> Thanks,
> Shalini.
>
> Dies Koper wrote:
>> Hi Shalini,
>>
>> I finally finalized my patch (attached to the issue).
>> I have split up the messages. In the case of ResourceException: I take
>> advantage of RE's implementation of getMessage to include the error code.
>>
>> May I commit it to V3 trunk?
>>
>> Regards,
>> Dies
>>