Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 77058 invoked from network); 29 Oct 2006 05:00:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2006 05:00:39 -0000 Received: (qmail 70329 invoked by uid 500); 29 Oct 2006 05:00:44 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 70280 invoked by uid 500); 29 Oct 2006 05:00:44 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 70269 invoked by uid 99); 29 Oct 2006 05:00:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 22:00:44 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of nbeyer@gmail.com designates 66.249.82.233 as permitted sender) Received: from [66.249.82.233] (HELO wx-out-0506.google.com) (66.249.82.233) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Oct 2006 22:00:32 -0700 Received: by wx-out-0506.google.com with SMTP id s13so1118013wxc for ; Sat, 28 Oct 2006 22:00:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=qJA7AyrM/07OQRLS6Mg5fEihAunEonxLw+TPI+8wDvDKy0BnXBIt4NH0u/t4jCgIHyOX67q22Vd8D14oWi+iLHYD6+gMayT0feUbqGaKSus8AFFGBJ7dv2RkmxLFt8V3FuG7KQh9VQ6CCSz4aZvwC9ifAKfN3VgOLQQ3FKi0GXo= Received: by 10.90.94.2 with SMTP id r2mr351751agb; Sat, 28 Oct 2006 22:00:11 -0700 (PDT) Received: by 10.90.66.18 with HTTP; Sat, 28 Oct 2006 22:00:11 -0700 (PDT) Message-ID: <3b3f27c60610282200w2445a56ena39736e4a6c4fed5@mail.gmail.com> Date: Sun, 29 Oct 2006 00:00:11 -0500 From: "Nathan Beyer" To: harmony-dev@incubator.apache.org Subject: [classlib][rmi] Code smell - Thread.sleep() in ActivationGroup method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org 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