Re: [Meinds-developers] Aspect oriented framework, first go
Brought to you by:
emcs,
rickardoberg
|
From: Rickard <ri...@xp...> - 2001-11-29 08:45:03
|
Dmitri Colebatch wrote:
> got another query...
>
> in CallLog, you have
>
> public Object invoke(Object proxy, Method method, Object[] args)
> throws Throwable
> {
> // Log call
> if (!method.getDeclaringClass().equals(Object.class))
> ^^^^^^^^^^^^
>
> shouldn't it be
>
> public Object invoke(Object proxy, Method method, Object[] args)
> throws Throwable
> {
> // Log call
> if (!method.getDeclaringClass().equals(getObject().getClass()))
No, because all I wanted to do is avoid writing out all Object calls
(toString(), equals, hashCode).
> ? it seemed that the log methods weren't really coming out that
> usefully so I had a look... this change makes them look quite odd in
> places, my thoughts are that this is due to the implicit toString() calls
> going through the proxy, and hence through the logger... I'm assuming that
> this sort of logging probably wouldn't be done via an interceptor, the
> logging you'd be interested at the interceptor would be business logging
> yes?
Correct, hence the above filter :-)
/Rickard
--
Rickard Öberg
|