Any luck?
I'm running into the same issue with the following VM:
Java HotSpot(TM) Client VM (build 1.5.0_05-b05, mixed mode, sharing)
Running on Ubuntu 6.06, tried under eclipse and with the command line.
Occurs with Mina 1.0.1 and 1.0.2 releases.
I decided to try to pare down my code to the minimum required to duplicate
the problem.
I made a simple class with both a JUnit test case and a main method. The
interesting part is that the JUnit test works (and terminates the process),
but the main method (which calls the same code) leaves the process running.
Also, the mina examples work fine (Tennis, etc), which makes me think I've
got to be doing something wrong - but there's not a lot of code for there to
be a problem in.
Here's my code:
import java.net.InetSocketAddress;
import junit.framework.TestCase;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.IoHandlerAdapter;
import org.apache.mina.transport.socket.nio.SocketConnector;
public final class MinaClientTest extends TestCase {
public static void main(String[] args) {
new MinaClientTest().testClientClose();
}
public void testClientClose() {
SocketConnector connector = new SocketConnector();
ConnectFuture connectFuture = connector.connect(
new InetSocketAddress("www.google.com", 80),
new IoHandlerAdapter() {});
connectFuture.join();
connectFuture.getSession().close().join();
System.out.println("Session closed");
}
}
Thanks in advance for any help!
-Eric Fitchett
afa654321 wrote:
>
> Thx Trustin.
>
> JVM is:
>
> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-rc-b103, mixed mode)
> Has anybody else experienced similar behavior?
>
> I'll look into it further.
>
>
--
View this message in context:
http://www.nabble.com/session.close%28%29-tf3306314.html#a9639309
Sent from the mina dev mailing list archive at Nabble.com.