IIT Software wrote:
Transparent Reconnect is enabled by default so the client tries to reconnect until it reaches max-retries. That's apparently what you see.
That makes sense, thank you for explanation.
IIT Software wrote:
If you want to get informed about connection lost, register a javax.jms.ExceptionListener.
I do this, the method onException gets called, but that is irrelevant to my problem.
IIT Software wrote:
All pending requests wait until the reconnect succeeds or max-retries have been reached. In the latter case the requests are cancelled and the commit returns a JMSException.
My problem is that the commit of my session with MessageConsumer hangs - it does not return JMSException! I am attaching a simple program P2PTest.java which proves this misbehaviour which I consider to be a bug in the SwiftMQ code. How to use it: install SwiftMQ 7.5.1, start smqr1, start "java -cp .;jars/swiftmq.jar;jars/jms.jar P2PTest", stop smqr1 and see that my program never finishes because the thread Consumer is blocked infinitely when calling session.commit() which is in a contradiction with your declaration that JMSException would be thrown in this case.
P2PTest.java