You need to sign in to do that
Don't have an account?

How to keep session alive
Hi,
Is there a way to keep the session alive through the API by making some API calls within every two hour timeout period? It seems that trying to keep the session alive using global describe calls or query calls fails after a certain time, even though the session does last longer than the original 2 hour period.
What is the maximum amount of time a session can be kept alive?
What API calls should be used to keep the session alive?
Thanks,
Shun
Hi Shun,
The session id is valid for 2 hours, after which you will need to login again.
Hi Dave,
When working on the salesforce site itself, a prompt comes up that allows the user to continue the session - can we use the same kind of mechanism but through the API to keep the session alive?
Also, I've tried keeping the session alive using query calls and the session seems to last longer than 2 hours. Is there any combination of API calls that will keep the session alive indefinitely?
Sorry to basically ask you the same question, but I want to exhaust all possibilities of keeping the session alive before resorting to having the user have to relogin.
Thanks,
Shun
I'm just about to try and tackle this myself. I was thinking of doing a quick call to get the system time using the existing binding object when opening up each servlet. If that returns null, login again and update the binding object. I don't expect us to have many users logged on at one time so this should be fine.
Any other suggestions or comments? I'll look over the code example that was provided. THANKS!!
Hi Shun,
Session ids are good for 2 hours from the time of issuance. Notice there are not caveats or modifiers to that statement. You don't have to have the user relogin. If you cache the user credentials you can relogin behind the scenes.
Thanks for the clarification. We'll probably log the user in automatically behind the scenes.
Shun
Hi I want the code which you provided in the link on sourceforge.
I am not able access the code through the link.
Can you send me the code to tumusudheer@yahoo.co.in
thank you,
Sudheer.