Hi claudiobosticco,
the only workarounds I can imagine are non-Smartclient. How about two application servers and a load balancer that filters out all RESTHandler requests and sends them to a second application server. There you then can set <session-timeout>1</session-timeout>. This way if sessions are discarded (I don't think that happens) it will only affect sessions you don't need anyway. And if they are serialized to disc, it will affect much less sessions because of the low timeout.
Best regards
Blama
Announcement
Collapse
No announcement yet.
X
-
Originally posted by Blama View PostThis in turn results in the fact that all our API requests, which use DSRequests via RESTHandler also create a session.
Any chance that you found a workaround that you may share?
Leave a comment:
-
-
Hi Isomorphic,
that's great news. I'll test it eventually (when switching to 13.0p).
Best regards
Blama
Leave a comment:
-
We actually did this work back in May 2020, shortly after your original post, but it somehow slipped through the cracks and we didn't post on here about it. Sorry about that. The commit was only made on the main development branch, so it will not be present in versions 12.1 and earlier. So could you try your application with version 13.0 and confirm that the issue with unwanted sessions is resolved?
Thanks,
Isomorphic Software Support
Leave a comment:
-
-
12.0p: Issue with unexpectedly created sessions
Hi Isomorphic,
our application works in serveral modes:- Normal Login
- Cron Job or Quartz triggered jobs
- API access
The other more automated types of accessing the system are request scoped and perhaps store information the ServletRequest, but not in a session.
Additionally EAI tools typically don't support sessions anyway, as this contradicts the REST-statelessness.
It seems though that you unintentionally create sessions as well for every DSRequest. This in turn results in the fact that all our API requests, which use DSRequests via RESTHandler also create a session.
Please have a look at DSRequest.trackTimings():
Here it is clearly wrong.
This also affects other parts of the framework:
These are the framework methods that call getSession() (without am explicit false-parameter. This also applies to getSession(true) calls):
Here you should be using HttpServletRequest.getSession(false) everywhere IMHO.
Can you have a look please and fix this if you agree.
Thank you & Best regards
BlamaTags: None
Leave a comment: