Apache mina TCP server its working fine when single user sending HL7
message using HAPPI Test panel(tool for sending HL7 messages).

*Its Working fine with # no of messages sent by HAPPI test panel*

*But When more then two user try to sent # of message concurrently then
some message not transmit by *

*HAPPI Test Panel , its give error*

Failed to transmit message. Time out waiting for response to message

------------------------------------------------
Peices of code===
-----------------------------------

private SocketAcceptor acceptor=new NioSocketAcceptor();
acceptor.getFilterChain().addLast("codec",new ProtocolCodecFilter(new
TextLineCodecFactory(Charset.forName("US-ASCII"))));
acceptor.getFilterChain().addLast("Messagefilter",new MessageFilter());
acceptor.setHandler("MyHandler",new MyHandler());
try {
acceptor.bind(new InetSocketAddress(portNo));
}
catch (  IOException ex) {
throw new RuntimeException("Couldnt bind to port: " + popPort,ex);
}

--------
MessageFilter class extends IoFilterAdapter and override the messageReceived
--------
@Override
public void messageReceived(NextFilter nextFilter, IoSession
session,Object message) throws Exception {

    System.out.prinln(message);
    ........ my simple stuff here.....
    nextFilter.messageReceived(session, strMsg);
}



--------

is there any configuration remaining ,Is this single thread and synchronous?
Why message are not receive concurrently when multiple sender sent
messages to same port?



-- 
Thanks & regards ,
Amit Mevada

Reply via email to