Hi,All, Are any experts or mina-devs willing to help me to track the issue ?
----- Original Message ----- From: "Allen Jiang" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Saturday, September 13, 2008 2:20 PM Subject: Fw: API Issue: ConnectFuture.await() > Hi, > The JVM is jre1.5.0_11,the system is Microsoft Windows XP Professional > 2002 SP2, The IDE is Eclipse 3.4 ,and attach my part code,you only pay more > attention on the highlight line ,thank you. > > public boolean connect() throws CrescentException { > ConnectFuture connectFuture=null; > > SocketAddress socketAddress= new > InetSocketAddress(clientInfo.getIp(),clientInfo.getPort()); > for(int i=0;i<clientInfo.getReConnectTime();i++){ > > connectFuture = connector.connect(socketAddress); > try { > connectFuture.await(clientInfo.getConnectTimeout(),TimeUnit.MILLISECONDS); > //in this line:clientInfo.getConnectTimeout()'s value is 5000 ms,but in > fact, it sleep in 1000ms in PC which has 2 CPU > } catch (InterruptedException e) { > throw new ClientException("Client-connect-1001",e.getMessage(),e); > } > if (connectFuture.isConnected()) { > Logger.info("Successfully connected"); > try { > session = connectFuture.getSession(); > } > catch (RuntimeIoException e) { > throw new ClientException("Client-connect-1002",e.getMessage(),e); > } > return true; > } > > } > Logger.info("Connect failed"); > return false; > } > ----- Original Message ----- > From: "Emmanuel Lecharny" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Saturday, September 13, 2008 2:15 AM > Subject: Re: API Issue: ConnectFuture.await() > > >> Allen Jiang wrote: >>> Hi, >>> Thank you for your reminder,The version I used is mina-2.0.0-M3. >>> >> Sorry, I missed the method in DefaultIoFuture... >> >> which JVM are you using ? Which system ? It would be also interesting to >> past the portion of the code which cause the problem. >> >> thanks ! >> >> -- >> -- >> cordialement, regards, >> Emmanuel Lécharny >> www.iktek.com >> directory.apache.org >> >> > ----- Original Message ----- > From: "Allen Jiang" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Saturday, September 13, 2008 2:15 AM > Subject: Re: API Issue: ConnectFuture.await() > > Hi,ALL, > when I use the API :ConnectFuture.await(5000,TimeUnit.MILLISECONDS) ,it > performance different resuilt in different PC as follows: > First, I use the API in a PC which has only one CPU,when it connect > another remote PC (cut the network on purpose),the interval time is 5000ms, > however,when I use it in in a PC which has two CPU,the interval time is > 1000ms, how strange the problem is ! > > BR > Allen > >
