Openfire Auto Reconnect with Pandion

I know the Pandion client is not supported here but does anyone know of a way to set it to auto reconnect if the openfire service stops, for example if the server Openfire is on is restarted? I really like the Spark client but from my testing is uses way to much memory on my somewhat slow and limited client machines.

Thank you,

Any help would be greatly appreciated.

-DiscoPymp

This isn’t an aswer to your question, just a comment on your statement. I’ve found that both applications use large amounts of memory.

Pandion fires up a full instance of IE to run it’s GUI, so it uses between 80-100MB of RAM, while Spark uses the JavaVM so it also uses 80-100mb of RAM. Pandion is a more visually attractive product, but as you said, it’s not being supported anymore and Spark is leaving it behind in terms of new functionality.

As far as I can tell when I fire up Pandion it only creates one new process and uses anywhere from 5 to 30 megabytes. Spark seem to use at least 64 MB’s just when sitting idle. Plus I do not have to install Java on every client machine which is a pain as it seems there is a Java update every other week. With Pandion I can customize it totally by simple HTML and Java Script edits and deploy it by just copying the directory to the client machines with the users totally oblivious.

-DiscoPymp

Firstly, it’s hard to understand all the processes, memory management etc. stuff without being Windows expert. Looking only at the task manager showing values is not enough, there is much more behind that (virtual memory, other process linking to main process that too consumes some part of memory, drivers, etc.). You can see only one process of Pandion itself, but it can consume other memory through other processes. Same with Spark. Furthermore, amount of memory shown can be only reserved and will be released if needed by other programs. The main Spark problem is not an amount of memory consumed by JVM (well, at least on 512 MB systems), but the response time of JVM and java apps in general. It lacks some speed, especially in GUI area.

You dont have to install java to run Spark. Spark offline setup package already contains java and will install it in Spark program folder (jre dir).

Here’s how Spark and Pandion line up on my machine (see attachment), I just started both of them and connected to the Openfire Server.

My Machine is Windows XP SP3 with IE 7 and 2GB of RAM.

Pandion is using what looks like 183MB of RAM (92 Physical and 91 Swap).

Spark is using what looks like 96MB of RAM (51 POhysical and 45 Swap).

And was wroot said, if you use the offline install you get a jre installed for you, and that jre won’t go looking for updates.

I dont know what your smoking but it must be pretty good. Im running WinXP SP2, IE7, AMD 64 4200 X2, 4 Gigs Ram and NO paging file.

Pandion uses 5 to 40 MB RAM when running.

  • DiscoPymp

It is the Openfire server that is not communicating with the clients correctly. The Pandion client is by default set to auto reconnect, but when you stop the Openfire service or reboot the server openfire is running on, the clients do not get a response from the server without user intervention. Ejabberd server does not have this problem. Though ejabberd is not as pretty, easy to use or have all the bells and whitles as Openfire at least it works.

I cant imagine how a server can inform anyone that it’s available. If it was rebooted it has lost all the sessions info. Sever cant just broadcast to any address or IP that it’s available again. I think it’s up to client to poll server and find if that’s available. My clients (Exodus) reconnect fine.

All I’m saying is that with ejabberd, if i stop the windows process on the server or just reboot the server then start it back up, the pandion clients auto reconnect as soon as the process is started back up and it is not so with Openfire. Therefore it has to be what the Openfire service does not send “HEY I’M CLOSING, LOOK FOR ME TO COME BACK” alert before it shuts down.

-DiscoPymp

Hi DiscoPymp,

Would you be interested in using Pandion to capture the shutdown alert that ejabberd is sending out and posting it to the forums?

Cheers,

Ryan

DiscoPymp wrote:

Therefore it has to be what the Openfire service does not send “HEY I’M CLOSING, LOOK FOR ME TO COME BACK” alert before it shuts down.

This is a bit of nonsense. What if it was a cold reboot and server wasnt able to send such message? All clients wount try to reconnect when? I dont believe there is such logic in ejabberd either. As i said my clients (Exodus and Spark) are reconnecting fine after i reboot a server. At my production server i just reboot server machine and then Openfire starts as a daemon (service). Exodus and Spark keeps trying to reconnect all the time until server gets available. How is in your case? Doest it try to reconnect all the time or just goes offline and do nothing? In Openfire when a user is kicked, Exodus client is not trying to reconnect. Client gets some command just to log off. Maybe that’s your case? Or maybe your service is not shutting down properly and some sessions info is forbidding clients to reconnect. What if you reboot machine instead of just rebooting the service? Will they be able to reconnect?

I finally found the answer.

go to C:\Program Files\Pandion\src\main\XMPPOnStream.js or wherever you have pandion installed.

in file XMPPOnStream.js find near line 300

Code:

else if ( ReceivedXML.documentElement.selectSingleNode( ‘/stream:error’ ) )

{

if ( external.windows.Exists( ‘signup’ ) )

OnLoginAbort();

else

{

external.globals( ‘XMPPReconnect’ ) = false;

replace with

Code:

else if ( ReceivedXML.documentElement.selectSingleNode( ‘/stream:error’ ) )

{

if ( external.windows.Exists( ‘signup’ ) )

OnLoginAbort();

else

{

if ( ReceivedXML.documentElement.selectSingleNode( ‘/stream:error/system-shutdown’ ) )

external.globals( ‘XMPPReconnect’ ) = true;

else

external.globals( ‘XMPPReconnect’ ) = false;

after you make this adjustment to your pandion will auto reconnect.

Thank you

-DiscoPymp