tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adiwibowo <>
Subject Remote client Connection Performance
Date Mon, 13 Jul 2009 07:23:07 GMT


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.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) 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);
            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:
Sent from the OpenEJB User mailing list archive at

View raw message