The best way would be to take Thread dumps and see what's going on inside.
Using a logging filter could tell you a little more when things have
been processed...

thanks
ashish

On Tue, Apr 20, 2010 at 9:53 PM, Vijay K Pandey <vpan...@mdes.ms.gov> wrote:
> Hi,
>
> I have an application which has a very simple scenario of sending Java 
> POJO(serializable) objects from Mina client to server and client waits for 
> the response.
>
> It was all working very fine with mina-core-2.0.0-M3.jar but looks like 
> something has changed in  mina-core-2.0.0-M6.jar and mina-core-2.0.0-RC1.jar 
> where on several messages mina server receives the message from client ( both 
> process running on same machine) after a delay of 5 seconds. I can see that 
> on client side LoggingFilter has written the message but then there is a 
> delay on server side when it is received.
>
> I ran  the test on the same "dataset" for the above 3 versions of MINA and - 
> M3 runs fine without any issue and there is no delay. I am testing this in a 
> controlled environment where at any given point of time only 1 message is 
> sent. Only after the response is received, does the second message is sent 
> out.
>
> Message is basically  - an array List - have 3 members where2 members are of 
> string type and  1 member is HashMap of around 12 objects(11 are simple 
> primitive wrappers and 1 POJO - having 6 primitives wrappers)
>
> Can someone point me to the right direction?
>
> Thanks
> Vijay
>
> -----------------Mina client code snippet ------------
>            connector.getFilterChain().addLast("codec",new 
> ProtocolCodecFilter(new ObjectSerializationCodecFactory()));
>            connector.getFilterChain().addLast( "logger",new LoggingFilter() );
>            connector.setConnectTimeoutMillis(30 * 1000);
>
>            ConnectFuture future1 = connector.connect( address );
>            future1.awaitUninterruptibly(15, TimeUnit.SECONDS);
>            if (!future1.isConnected()) {
>                  return false;
>            }
>            session = future1.getSession();
>
>            CloseFuture closeFuture = session.getCloseFuture();
>            closeFuture.addListener((IoFutureListener<?>) new 
> IoFutureListener<IoFuture>() {
>                public void operationComplete(IoFuture future) {
>                    System.out.println("The session is now closed");
>                    logger.info("Mina client session is getting closed");
>                }
>            });
>
> ---------------------------------------Mina Server Code snippet 
> ---------------------------------------------------------
>        acceptor = new NioSocketAcceptor();
>
>        acceptor.getFilterChain().addLast( "logger",
>                                           new LoggingFilter() );
>        acceptor.getFilterChain().addLast( "codec",
>                                           new ProtocolCodecFilter( new 
> ObjectSerializationCodecFactory() ) );
>
>        acceptor.setHandler( handler );
>        acceptor.getSessionConfig().setReadBufferSize( 2048 );
>        acceptor.getSessionConfig().setIdleTime( IdleStatus.BOTH_IDLE,
>                                                 3 );
>
>        acceptor.bind( new InetSocketAddress( "127.0.0.1", port ) );

Reply via email to