harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: [classlib][rmi] Code smell - Thread.sleep() in ActivationGroup method
Date Sun, 29 Oct 2006 09:09:31 GMT
2006/10/29, Nathan Beyer <nbeyer@gmail.com>:
> I found this bit of code in the java.rmi.activation.ActivationGroup. I
> snipped the calls to the RMI logger, for a bit more clarity.
>
>    protected void activeObject(ActivationID id, MarshalledObject mobj)
>            throws ActivationException, UnknownObjectException,
> RemoteException {
>        try {
>            Thread.sleep(500);
>        } catch (Throwable t) {
>        }
>        // ...
>        monitor.activeObject(id, mobj);
>        // ...
>    }
>
> Fighting my instincts, I checked the javadoc for this method and it
> doesn't say anything about putting the current thread to sleep for
> one-half of a second, so I'm pretty sure this is a hack of some sort.
> Anyone have any thoughts about why this is needed? The tests run fine
> with out this extraneous sleep.
>
> BTW - There is a LOT of logging in the RMI module; can we blow this stuff away?

Can we do it later? It's easier to remove then to add and we can
wait until our VM has those nice features that Tim referred to.
Meanwhile we could fix the bugs found by our users.

Thanks,
Mikhail

>
> -Nathan
>

Mime
View raw message