In JBOSS 7
I've a JMS Producer which establishes the session,connection and sends the message to queue running on other server with the code:
Queue queue = (Queue) initialContext.lookup(queueName);
connection = connectionFactory.createConnection(userName,password);
Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
MessageProducer sender = session.createProducer(queue);
TextMessage message = session.createTextMessage(textMessage);
This was being successful and no issue in this.It is being pushed successful to other server.Now,the problem is whenever the message got failed to push due to some issue like "The Queue Server where Consumer is sitting got down/network failure",the pushing has failed.
But,after few minutes/hrs the server has started and the message which got failed to push has been successfully pushed to Queue server.
This scenario has to be stopped.The reconnect should not happen and that transaction should be closed and session must be destroyed whenever that connection to server has failed for first time.
My standalone-full.xml settings of JMS are
Please suggest the same.