unpack exception handling

24 views
Skip to first unread message

jayadeep.cse

unread,
Nov 29, 2016, 10:36:38 PM11/29/16
to jPOS Users
Hi All,

I have recently started working on jPOS and it has been very useful to me so far. I want to know if there is any way to handle the unpack ISOException and send the error response to the requester.
I am implementing the Q2 server with NACChannel & Generic packager.  Unpack is happening at very low level so that I am not able to handle the exception at my business level logic. 

Waiting any inputs on this.

Thanks,
Jayadeep

chhil

unread,
Nov 30, 2016, 1:50:23 AM11/30/16
to jpos-...@googlegroups.com
The basechannel does throw an isoexception on unpack. So you could extend the NACChannel and override the receive method  and maybe
put what you need into a space and let a qbean wait on it and then you can handle it.

If someone has a better way to do it, please share here.

-chhil



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/0450fd05-3105-43e8-93f6-0f8ec75cd3ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alejandro Revilla

unread,
Nov 30, 2016, 1:26:35 PM11/30/16
to jPOS Users
​I didn't implement that functionality because I try not to tell a remote endpoint what's wrong, in case somebody is trying to abuse the system.

During certification, an operator can monitor our logs and see what's wrong, and tell the remote endpoint.

That said, I think Chhil's suggestion is easy to implement, override the receive method, trap the exception, do something, and re-throw it.


jayadeep.cse

unread,
Nov 30, 2016, 11:26:35 PM11/30/16
to jPOS Users
Thank you Chhil & Alejandro. for your help. Now I can see what I need to do.

Thanks,
Jayadeep
Reply all
Reply to author
Forward
0 new messages