0

Below Hybris OOTB Strategy is extended by Custom Session Close Strategy so when the session is closed/ session is logout then it should be executed.

de.hybris.platform.servicelayer.web.DefaultSessionCloseStrategy.DefaultSessionCloseStrategy

Custom Strategy is being executed at single server(Developer Machine); whereas, it fails at multiple node servers.

This below session time out has been set as 1800 so it should be executed but its not being executed at multiple node servers(Google GCP clouds).

default.session.timeout=1800

Do we need to do extra configuration to make SessionCloseStrategy execution?

Thanks

HybrisHelp
  • 5,518
  • 2
  • 27
  • 65
user3691164
  • 11
  • 1
  • 1
  • 6

2 Answers2

0

The property default.session.timeout is only read in

hybris.platform.servicelayer.web.DefaultSessionCloseStrategy#setTimeoutOnHttpSessionCreation()

So, unless you are manually reading it is a custom overridden class the default behavior should be executed. This time is in milli seconds.
You can also check if the property file is same for all the nodes. To be sure go to -

https://[your node]/hac/platform/config

and search for the property : default.session.timeout and check the value.
Also, check if the session timeout on your node is happening in 86400 milliseconds because this is the default value for timeout if the property default.session.timeoutis not read.

Farrukh Chishti
  • 7,652
  • 10
  • 36
  • 60
  • 1
    Thanks @Farrukh, I verified at all the nodes we set to 1800 ms but the custom close session strategy is not getting executed even if i logged out of session at the storefront. – user3691164 Mar 16 '19 at 20:53
  • @user3691164 : Can you add the spring.xml entries of your bean in the question. You can replace your project name with `customproject`. – Farrukh Chishti Mar 17 '19 at 06:22
  • 1
  • 1
    you can see the bean definiton above but i couldn't understand how do you meant that replace project name with customproject. I think we have to redefine it as [If ABC is project] : – user3691164 Mar 18 '19 at 09:24
  • @user3691164 : I was just a suggestion that you can replace you project name with abc or something..... The bean definition looks correct. I think it might have something to do with the context in which the bean is overridden. I am also facing this issue with one of the OTB beans. https://stackoverflow.com/questions/55141817/change-date-format-in-dto-json-on-returning-through-responsebody – Farrukh Chishti Mar 18 '19 at 11:04
  • @user3691164 : Did you get any solution? – PriyaS Aug 29 '23 at 17:38
0

Create [extension].session.timeout in project.properties. And assign some value in seconds. This way you dont need to use the global session timeout (default.session.timeout)