Saju
Saju

Reputation: 422

Keeping Java Server Session Live in Flex

I need to keep the session active when the user is working on my application. Application is connecting to Java using webserivce. I have a service to keep/ check server session active/timeout. Which is the best approach to achieve this? I checked for the

systemManager FlexEvent.IDLE event

but didn't suite my need. Any workaround for this??

Thank you!

Upvotes: 0

Views: 416

Answers (2)

MonkeyMagiic
MonkeyMagiic

Reputation: 138

Create a HeartBeatMonitor.as class who's sole responsibility is to react to responses from the server and carry on beating if a response was successful.

Off the top of my head you would want this class to implement IResponder and have a timer for the delay between the heartbeats.

HeartBeatMonitor + HeartBeatCommand (for making call) = client side session keep alive

Upvotes: 1

Anıl Canlı
Anıl Canlı

Reputation: 434

Did you write your own java server? If so, you should open a socket in server side and wait for connection. After that you can create your protocol which is between server and clients. And then you should decide when to close your connection/session in server-side. IF I didn't misunderstood, you can check How to write server side java

Upvotes: 0

Related Questions