tags:

views:

414

answers:

3

Hi

Does anyone know a standard way to keep alive the http session as long user has open the flex app in the browser?

I played around with the polling mechanism of blazeds. But it had no affect on the http session.

thanks & regards

Cyrill

+1  A: 

Why do you need the http session to stay alive?

We have authentication enabled in our flex-weborb-.net application. If the session is terminated, the next call to weborb will throw a security exception. In this case we just re-authenticate and do the server call again. A new session is created and the user can continue his work. Like this, no polling is needed. I guess it's the same with blazeds.

If the session must stay the same, then I would suggest to ping the server every couple of minutes depending on the session timeout value.

Lieven Cardoen
We have a read-only view on a messaging system. The session will timeout since there are no requests send from the client explicitly. I think doing a ping-pong with the server is the only way to keep the session alive in this scenario.
Christophe Herreman
A: 

One option is to submit an AJAX keepalive request from javascript in the hosting HTML page.

Michael Brewer-Davis
A: 

There is no standard way of doing this. We do a ping-pong with the server every n-seconds (check the AS3 Timer class), where n must be lower than the session timeout. It's best to keep your session timeout as low as possible to reduce memory consumption on the server, especially when you have a lot of concurrent users.

Christophe Herreman