Java version 1.6.0_13-b03
Windows XP Pro 2002 SP 3
Would be easiest if I could send a zip file.
The zip file will contain source code, thread dump, client jar file and
server jar file and misc jars to run code.
Unzip into a new folder.
To run the server prototiger_srv-1.0.0.jar on one computer
java -Djava.library.path=. -jar prototiger_srv-1.0.0.jar 2000
And on another computer execute
java -Djava.library.path=. -jar prototiger_clt-1.0.0.jar <ip address
of server> 2000
The zip file can be downloaded at
http://www.tabbyinstall.com/example-20090606.zip
Kelly
Emmanuel Lecharny wrote:
Kelly Wiles wrote:
I changed the code to do the following when the disconnect method is
called in my IoHandlerAdapter.
<snip/>
The "here 1" and 2 are printed then a 60 second pause.
Then the command shell prompt appears.
The "here 3" and 4 are not printed.
So the call to cf.awaitUninterruptibly(CONNECT_TIMEOUT); blocks for
60 seconds.
Do I need to do the connector.dispose() before the do the wait?
No, certainly not.
I am probably doing stuff out of order I am thinking.
Nope, it's correct.
Now, looking at MINA's code, I see no place you can be blocked in for
60 seconds, except if your system time is not giving you a bad value.
We have fixed a potential bug in await0( timeout ), but I don'ts ee
how it can impact your code.
Hav you done a thread dump while your client is waiting for 60 seconds
? I would like to see which thread is blocking.
Also please give us the OS and java version.
Thanks !
Kelly
Emmanuel Lecharny wrote:
Kelly Wiles wrote:
Hi
When I close a session using the call
session.close(true).awaitUninterruptibly(3000);
The session does not close for 60 seconds.
What do you mean ? Have you checked the CloseFuture.isClosed() result ?
CloseFuture closeFuture = session.close(true);
closeFuture.awaitUninterruptibly(3000);
if (closeFuture.isDone()) {
// The session is closed...
}
Is this the right way to shutdown a connection?
Yes, it will close the session.
I am trying to send two messages to a server then once the
responses have returned I shutdown my client program. But the
client program does not quit for 60 seconds.
You also have to dispose the Connector. Closing the session won't be
enough.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.339 / Virus Database:
270.12.53/2156 - Release Date: 06/05/09 06:24:00
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.54/2158 - Release Date: 06/06/09 05:53:00
--
Schedule A Meeting
Meeting Management Software
http://sam.kdkhome.com/
Tabby Install and Tabby Editor for Eclipse
Create application install programs easily.
http://www.tabbyinstall.com/
Jar Compiler an Eclipse Plugin
Compile Java Jar files into a native executable.
http://www.tabbyinstall.com/jarc/JarCompiler.html
ISO Builder an Eclipse Plugin
Create CDROM ISO images.
http://www.tabbyinstall.com/isobuilder/ISOBuilder.html
ProtoTiger for the Apache Mina project.
Generates client/server source code from GUI design.
http://www.tabbyinstall.com/prototiger/ProtoTiger.html