You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by adiwibowo <ku...@yahoo.com> on 2009/07/13 09:23:07 UTC
Remote client Connection Performance
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.
Re: Remote client Connection Performance
Posted by adiwibowo <ku...@yahoo.com>.
David Blevins wrote:
>
>
> I haven't seen this issue before.
>
> What OS and java version are you using on the client and server?
>
>
> -David
>
>
>
On the server I'm using Sun Solaris and java 1.5.0_14,
on the client Windows XP and java 1.5.0_06.
The client connect to the server via internet by it's public IP.
Thanx.
-adiwibowo-
--
View this message in context: http://www.nabble.com/Remote-client-Connection-Performance-tp24457217p24472696.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: Remote client Connection Performance
Posted by David Blevins <da...@visi.com>.
On Jul 13, 2009, at 12:23 AM, adiwibowo wrote:
>
> 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?
I haven't seen this issue before.
What OS and java version are you using on the client and server?
-David