I can't seem to get my head around this, so I'm asking for your help.
We are using JPOS to transfer some messages between ourselves and a business partner, and we are seeing errors about "shutdownOutput() is not supported in SSLSocket". This seems to be a rare issue, as another developer remarked upon in 2012:
Why am I the first person to encounter this issue? I presume I am missing something simple. Or nobody else uses SSL with jpos. Or nobody closes connections...
The subsequent discussion references a question here on SO, but the solutions suggested seem impossible to apply due to the following flow of events:
- we are making a single call into the JPOS library to send a request (
org.jpos.iso.BaseChannel.send(ISOMsg msg)
) - we are making a single call into the JPOS library to receive a response (
ISOMsg response = org.jpos.iso.BaseChannel.receive()
) - through a number of internal methods and submethods, JPOS receives the response, handles it, and closes the socket using the problematic "shutdownOutput()" call
- while attempting to close the socket, it will throw an exception -- and in doing so will discard the response we are interested in
It seems we have no "injection point" where we can actually receive the message, but not close the socket (we could do that ourselves, or handle the exception differently).
What am I not seeing here?
FYI, we are using JPOS v1.7.0 from 2010, but from reading the current code it seems that even v2.1.7 is doing it the same way.
Edit: Also, there is some logging functionality, but it seems to be completely contained within the receive()
call. I could perhaps investigate in further detail if I could inspect the log, but there seems to be no place where there is (or where I can) set (or pass in) a LogListener
. Where do I find info on how JPOS logs are managed, how can I view them?
EDIT 2: I was being blind while reading the code. Based on very insightful comments, we will have to upgrade our JPOS instance to at least v1.8.8 to obtain the fix for this issue.