harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Beyer" <nbe...@gmail.com>
Subject [classlib][rmi] Code smell - Thread.sleep() in ActivationGroup method
Date Sun, 29 Oct 2006 05:00:11 GMT
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?

-Nathan

Mime
View raw message