Hi,

The code try to connect the RMI registry before it tries to create a new one. In some cases that I experienced, the connection hangs if the RMI registry is not available. I had to use a customized RMISocketFactory to control the timeout so that the call can at least return. Some operating systems reports the ConnectException before the timeout.

Any idea that can be used to detect the existence of the RMI registry will be welcome.

Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <[email protected]>
Sent: Monday, October 05, 2009 3:31 AM
To: <[email protected]>
Subject: Re: Slow RMI Host start up

On Mon, Oct 5, 2009 at 9:03 AM, ant elder <[email protected]> wrote:
The caclulator-rmi sample keeps failing on the hudson build as the
client runs before the service has finished starting up. I've stepped
through the code to try to find why its so slow and it turns out to be
"this.factory = SocketFactory.getDefault();" in the constructor of
org/apache/tuscany/sca/host/rmi/RMISocketFactoryImpl that takes all
the time, around 20 seconds on my machine. Before i go spending time
investigate whats going does anyone know what could be going on there?

  ...ant


This has magically stopped happening for me now so i guess its some
intermittent network issue, which is probably also why it only
sometimes fails on the hudson build machine. Does anyone else ever see
it - the calculator-rmi itest intermittently failing when you run a
build? Or before it starting working fine I could also see the delay
when running the calculator-rmi-service sample with mvn or in eclipse.

...ant

Reply via email to