Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Automatically reconnect to XMPP server

Hi Jorg,

ECF has notification of disconnect...the notification is delivered as an instance of IContainerDisconnectedEvent/IContainerEjectedEvent via IContainerListener.handleEvent. IContainerListeners are added via IContainer.addListener(IContainerListener). So if you wish, you may initiate automatic reconnect using this notification.

As you point out, the XMPP 2.2.1 provider does not automatically do such reconnection, but more recent versions of Smack (3.X) do automatic reconnection, and we have an enhancement request to move to this new Smack implementation: I do think it would make sense to use the 3.0.0 implementation to handle automatic reconnect in the xmpp provider.

The primary thing about this is moving from Smack 2.2.1 to 3.X (most recent). I think we should attempt to coordinate and schedule work via in coordination with the work by Nuwan's gsoc project on the google services provider (which is also using/extending xmpp provider), as well as the Google Wave work: and perhaps even work on the Equinox XMPP server:

So, I think the upshot here is that there is/will be work on the XMPP provider (moving to Smack, adding other services, and google wave), and we just need to make sure that the automatic reconnect in Smack is used.

Jorg...are you able/willing to contribute work on the xmpp provider (e.g. help with the move to Smack 3.0.0)? I will, of course, coordinate the different work threads that are focused on the xmpp provider.



Jörg Rathlev wrote:

in the project I'm currently working on, we would like to automatically reconnect to an XMPP server if the connection fails. Smack version 3.1 supports this, so I have tried upgrading to Smack 3.1 (using the patch from [1]). However, I found out that when ECF's XMPP provider receives an event that the connection was closed, it then calls the XMPPConnections disconnect method, after which the XMPPConnection no longer attempts to reconnect to the server.

So now my question is: is there already some other way in ECF to automatically reconnect? If not, would it make sense to implement this in the XMPP provider (based on the support from Smack)? Obviously that would work only if the higher layers such as remote services can handle a disconnect/reconnect of the underlying connection.



Back to the top