Connection.stop() and close() don't seem to help.

Returning false from preFailover() is not a solution because that is invoked
once before the start of a failover, but my problem is when the failover is
already started when you try to shut down.

I'm starting to think I'll have to give up with the automatic failover, and
implement a reconnection logic myself...

Thanks
Marco


Phil Harvey-2 wrote
> I'm surprised that calling Connection.stop() doesn't abort failover.
> 
> Nevertheless, to abort failover I believe you can just return false from
> org.apache.qpid.jms.ConnectionListener.preFailover().  I guess your
> implementation would return false if the application was trying to shut
> down.
> 
> I don't think the behaviour of ConnectionListener is very well documented
> so the best reference I can find is the source code itself:
> 
> http://svn.apache.org/viewvc/qpid/branches/0.22/qpid/java/client/src/main/java/org/apache/qpid/jms/ConnectionListener.java?revision=1460483&view=markup
> 
> Phil
> 
> On 26 July 2013 09:59, pela <

> mpela.gatti@

> > wrote:
> 
>> Hi,
>>
>> The number of retries has been configured to an arbitrary high number, my
>> application should not give up but just retry forever until stopped by
>> the
>> user.
>>
>> Let me explain futher, the problem can come in two flavors:
>>
>> 1) I call the createConnection() on the factory, but the connection
>> cannot
>> be established. QPID starts its retry loop. The user tries to stop the
>> application, but I don't know how to stop QPID from looping (the
>> createConnection() hasn't yet returned so I can't even call close() ).
>>
>> 2) The connection can be established successfully, but it gets lost at
>> some
>> point. QPID starts its retry loop in its own thread. When the user tries
>> to
>> stop the application, I call stop() on the connection, but QPID doesn't
>> exit.
>>
>> Do you have any idea?
>>
>> Thanks
>> Marco
>>
>>
>>
>>





--
View this message in context: 
http://qpid.2158936.n2.nabble.com/Java-client-Cannot-stop-during-failover-tp7595882p7595945.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to