FYI: I finally found the problem with my desktop. Its host name was set an existing name in DNS but the ip address is assigned from DHCP. As a result, the RMI stub tries to connect to another machine instead of my own and it hangs. The test case runs successfully after changing the host name.

Thanks,
Raymond

--------------------------------------------------
From: "Raymond Feng" <[email protected]>
Sent: Friday, January 30, 2009 2:16 PM
To: "tuscany-dev" <[email protected]>
Subject: Testcase for host-rmi hangs on Red Hat Linux

Hi,

The test case for host-rmi hangs on my desktop (Red Hat Enterprise Linux Server release 5.2). I noticed that connecting to a non-existent RMI registry hangs on instead of throwing out a ConnectException. The problem can be reproduced by the following simplified test case without Tuscany code.

public class RegistryTestCase {
   @Test
   public void testCreate() throws Exception {
       Registry reg = LocateRegistry.getRegistry(9999);
       reg.list();
       System.out.println("Done");
   }
}

Do any of you see the problem too?

Thanks,
Raymond

Reply via email to