This is definitely possible what you are calling thread is probably another instance of your program in reality this is what happens I will show a simple illustration
FE1 Configure 5 Threads
FE2 Configured 5 Threads
Your client program asks the API to do something
Assume it was received by FE1 Thread1 it will forward to OTDS and return the authentication token so far everything will work.
You got what you needed from API again you invoke another API call chances are it will go to FE1 Thread 2 again it will work because your call contains
the session object... or a nonexpired token
Now think what would happen in this cycle if it went to FE1 Thread1 it sees the auth token it will discard it because the token when parsed
will reveal the IP address of FE1 and you are coming from FE2...
So what can you do?
Most people relax the cookie restrictions on Livelink Content Server to say don't use the IP address to validate me
Or some organizations put sticky algorithm on load balancer so a program always hits the same server
In long-running programs using CWS the Client developers pseudo code should be something like this as LL does not address it for you
I have to Call an API and I have an AuthToken
I should see if the TTL has expired if it has re-authenticate...
Also, Attachment Object of Docman is a very bad idea the better way is to rewrite that code using ContentService methods.
Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010