Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top