2 Replies Latest reply on Jan 30, 2013 1:15 AM by Guangquan Hao

    The failover in the version of 2.3.BETA3

    Guangquan Hao Newbie

      Hello,Everyone,

            Today I want to build up a nfs to implement the transaction-failover with sharing store,first I run the example in the directory of examples/jms,but it shows failure.I don't know why.I read some examples of the replication-failover,before killing the server,the client will sleep 2000ms,but in real world,we don't know when  the server will crash,without the sleeping time,the example will launch exception.I use the version 2.2.14 and 2.3.BETA3.The result is same.After then,I run the producer and the consumer partly,when I kill the server by ctrl+c,the producer cannot work continue,but the consumer can work continue.Soon I think because the consumer had sleeped for a short time with "consumer.receive(5000)",how can I solve this problem in the code of producer.

        • 1. Re: The failover in the version of 2.3.BETA3
          Andy Taylor Master

          Today I want to build up a nfs to implement the transaction-failover with sharing store,first I run the example in the directory of examples/jms,but it shows failure.

          Why dont you start by explaining how the example fails, without this we cant really help you. As far as the 2 sec wait this is just there to allow the cluster to form, this is not actually a real worl example. Show us the error and maybe we can help. Oh and if you are using discovery, make sure you have a loopback address configured.

          • 2. Re: The failover in the version of 2.3.BETA3
            Guangquan Hao Newbie

            I have read the documention carefully,I have realized that I failed because the client is blocking as described in  39.2.1.2 and 39.2.1.3

            The exception is javax.jms.TransactionRolledBackException or HornetQException.UNBLOCKED.When I use non-transactional and set the property block-on-durable-send false,the I succeed.I think that the examples in hornetq can succeed because the server crashed when there were no flying messages in the network.But when I set the property block-on-durable-send true,I failed, the exception is "HornetQException[errorCode=5 message=Connection failure detected. Unblocking a blocking call that will never get a response]".The documention says we should handle the exceptions with other work,but I dont know how to do.