Status: Open (View Workflow)
Affects Version/s: 3.9.3.Final
Fix Version/s: None
I'm migrating a web application written for Payara5 to Wildfly 18.
In my app I use an http client to make requests to Cisco Socialminer API. Since the app has to make these requests often, the client is created only once upon application startup and then is reused indefinitely.
One of the endpoints that creates a chat session returns a JSESSIONID cookie that is later used to poll for newly created chat session's events. I store the cookie in the database and set it manually when needed.
This is how I make the request:
The first call after application startup works just fine. However, upon receiving a response containing "JSESSIONID" cookie, the client stores the cookie and automatically adds it to the next request that is made with the same client instance.
This creates a problem, because Socialminer API doesn't expect a JSESSIONID cookie on that request and responds erratically.
I tried googling for a solution, but only solutions I've found involved rebuilding the client.
Is there a way to prevent Resteasy from storing the received cookie or at least prevent resteasy from attaching it to the consequent requests?