Transient clients

8 views
Skip to first unread message

Alan Honczar

unread,
Jan 19, 2006, 9:22:26 AM1/19/06
to jpos-...@googlegroups.com
I am rewriting...
If ISOServer client establishes a persistent connection, it is great to receive am exception when it disconnects.
If ISOServer client establishes a transient connection and disconnects after receiving the response, receiving an exception should increase the exceptions list with "false" exceptions, increasing the difficult to find the "real" ones.
Do you guys have any suggestions?

I appreciate. TIA,
Alan

-----Mensagem original-----
De: jpos-...@googlegroups.com [mailto:jpos-...@googlegroups.com] Em nome de Alan Honczar
Enviada em: terça-feira, 17 de janeiro de 2006 15:33
Para: jpos-...@googlegroups.com
Assunto: RES: Need Suggestions Listening to incoming ISOMsg packet


Mark, an observation: I use ISOServer and I have to live with the same SocketExceptions. My clients close the socket as soon they receive the whole message.
Here is the exception.
23/09/05 08:31:22:316 18 FINEST: <receive>
23/09/05 08:31:22:316 18 FINEST: <exception name="Connection reset">
23/09/05 08:31:22:316 18 FINEST:
23/09/05 08:31:22:316 18 FINEST: java.net.SocketException: Connection reset
23/09/05 08:31:22:316 18 FINEST: at java.net.SocketInputStream.read(SocketInputStream.java:168)
23/09/05 08:31:22:316 18 FINEST: at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
23/09/05 08:31:22:326 18 FINEST: at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
23/09/05 08:31:22:326 18 FINEST: at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
23/09/05 08:31:22:326 18 FINEST: at java.io.DataInputStream.readFully(DataInputStream.java:266)
23/09/05 08:31:22:326 18 FINEST: at org.jpos.iso.channel.NACChannel.getMessageLength(NACChannel.java:122)
23/09/05 08:31:22:326 18 FINEST: at org.jpos.iso.BaseChannel.receive(BaseChannel.java:502)
23/09/05 08:31:22:326 18 FINEST: at br.com.appi.isogateway.ISOServer$Session.run(Unknown Source)
23/09/05 08:31:22:326 18 FINEST: at org.jpos.util.ThreadPool$PooledThread.run(ThreadPool.java:99)
23/09/05 08:31:22:326 18 FINEST: </exception>
23/09/05 08:31:22:326 18 FINEST: </receive>
I did not find a politics to deal with transient connections in JPOS.
If you tell me something to avoid that I would appreciate very much.

TIA,
Alan


-----Mensagem original-----
De: jpos-...@googlegroups.com [mailto:jpos-...@googlegroups.com] Em nome de Mark Salter
Enviada em: terça-feira, 17 de janeiro de 2006 12:01
Para: jPOS Users
Assunto: Re: Need Suggestions Listening to incoming ISOMsg packet


My guess would be that your socket is being closed before the read is
being satisfied. Is your read far a specific number of bytes
(determined from the message header) or something else.

We might be in the danger of getting a little off topic, so...

I would consider saving myself the effort of finding my way through the
Socket jungle and reuse the effort already invested in getting jPos to
handle these things for me.
JPos adds little overhead than that which is necessary to communicate
with another system over TCP/IP.

--
Mark


--------

AVISO LEGAL - Esta mensagem e seu conteúdo - inclusive anexos - são para uso exclusivo de seu(s) destinatário(s), podendo conter informações confidenciais e/ou legalmente privilegiadas sobre a APPI Tecnologia S/A. Qualquer modificação, retransmissão, disseminação, impressão ou utilização não autorizada fica estritamente proibida. Se você recebeu esta mensagem por engano, por favor informe ao remetente e apague o material e as cópias de sua máquina.

LEGAL ADVICE - This message - including any attachments - contains confidential and privileged information from APPI Tecnologia S/A intended for the named recipient(s) only. Any modification, copying, printing or distribution of this message or the taking of any action based on it is strictly prohibited. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system.

---------


Alejandro Revilla

unread,
Jan 19, 2006, 9:20:17 AM1/19/06
to jpos-...@googlegroups.com
In ISOServer, we catch EOFException and gracefully log a short
warning without the full stack trace. But in this case, your client
seems to be aborting the connection somehow without properly shutting
down the socket.

See ISOServer.java around line 131.

--Alejandro

Reply all
Reply to author
Forward
0 new messages