You need to sign in to do that
Don't have an account?
rtompkins
HOWTO share binding in J2ee App
I have a java enterprise application that connects to salesforce and queries data.
I want the application to create a single BindingStub and share it between all of the users on the webapp. It also needs to automatically relogin when the session expires every 30 minutes.
I am currently creating a new bindingStub and logging in everytime a user wants to query salesforce. This is very slow and wasteful. What is the best way to implemenet the sharing of a bindingstub that will automtically relogin when the session expires.
Thanks in Advance.
Best Answer chosen by Admin (Salesforce Developers)
Superfell
don't share a single instance of the binding object, in almost all soap toolkits these objects are not thread safe. instead share the sessionId & serverUrl strings, and construct/configure a binding object as needed. for automatic relogin, most people either keep track of the time of the last login attempt, and login every XX minutes, or catch the invalid_sessionId error, and relogin at that point.