Hai,
I'm developing "Swing" application using "openjb.3.1" with standalone
configuration as the server. From the client, I connected using
InitialContext as follows:
p.put("java.naming.factory.initial",
"org.apache.openejb.client.RemoteInitialContextFactory");
p.put("java.naming.provider.url", remoteserver);
p.put(Context.SECURITY_CREDENTIALS, password);
p.put(Context.SECURITY_PRINCIPAL, user);
initContext = new InitialContext(p);
It needed 30 seconds to 1 minute in average to initiate InitialContext. I've
traced it and found that the bottleneck happened in first calling of
spec [i] = (byte) in.read() at the following class:
public class org.apache.openejb.client.ProtocolMetaData {
...
public void readExternal(InputStream in) throws IOException {
byte[] spec = new byte[8];
for (int i = 0; i < spec.length; i++) {
spec[i] = (byte) in.read();
if (spec[i] == -1){
throw new EOFException("Unable to read protocol version.
Reached the end of the stream.");
}
}
init(new String(spec,"UTF-8"));
}
....
}
There isn't any problem in second invocation and so on.
Anybody recognize the problem?
--
View this message in context:
http://www.nabble.com/Remote-client-Connection-Performance-tp24457217p24457217.html
Sent from the OpenEJB User mailing list archive at Nabble.com.