tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Remote client Connection Performance
Date Mon, 13 Jul 2009 23:43:57 GMT
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


Mime
View raw message