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

How to detect whether the session is expired or not, & if expired, how to set it back
Hi all,
I have to write an application which will query salesforce fo revery 5 mins & get the data and put it on my target Database.
But after 2 hours running continuously, I am getting "Invalid session Id" exception & my session is getting timed out. I know the default session time period is 2 hrs for salesforce.
So ,1) how to detetc whether the session is expired or not?
2) If session is expired, how to set it back dynamically, So i need to login again?
Currently what iam doing is, I am storing my login time, & when ever i am queying for salesforce, I am checking whethet the time of querying is 1hr 50min from login time. If yes i am again loging in.
so, 3) what about my previous session?
4) Is it good to keep that sessions open?
Any one please help me. I want this urgently.
Thank you,
Sudheer Tumu.
I have to write an application which will query salesforce fo revery 5 mins & get the data and put it on my target Database.
But after 2 hours running continuously, I am getting "Invalid session Id" exception & my session is getting timed out. I know the default session time period is 2 hrs for salesforce.
So ,1) how to detetc whether the session is expired or not?
2) If session is expired, how to set it back dynamically, So i need to login again?
Currently what iam doing is, I am storing my login time, & when ever i am queying for salesforce, I am checking whethet the time of querying is 1hr 50min from login time. If yes i am again loging in.
so, 3) what about my previous session?
4) Is it good to keep that sessions open?
Any one please help me. I want this urgently.
Thank you,
Sudheer Tumu.