cancel
Showing results for 
Search instead for 
Did you mean: 

how to get all the jalo sessions in the cluster?

Former Member
0 Kudos

how to get all the jalo sessions in the cluster?
I wanted to keep a restriction of check for a user to login or have only one session active for one customer for various reasons.
While doing this i was able to restrict the same user for multiple logins in one node, but was not able to do it in a cluster.

Thanks in Advance
Vinay

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

JaloConnection.getInstance().getAllSessions() is deprecated and implementation is returning Collections.EMPTY_LIST (version 5.5.1)

Former Member
0 Kudos

Please try this from the groovy tab (HAC) of your node :

  import de.hybris.platform.jalo.JaloConnection
  JaloConnection.getInstance().getAllSessions()

Best regards

Former Member
0 Kudos

The above code gives active sessions in that node only, but we are not able to get the sessions of other nodes. Best regards

Former Member
0 Kudos

Hello Vinay,

Here is what the official documentation says about handling sessions on a clustered environment:

You can set up your system to use either sticky sessions or non-sticky sessions.

Sticky Sessions Here, all web requests of one HTTP session are served from the same cluster node. If a request of a HTTP session was first dispatched to Node 1 such as http://www1.myshop.com, all subsequent requests will be dispatched to Node 1, such as http://www1.myshop.com.

Non-Sticky Sessions Here, web requests are dispatched to random nodes across the cluster, depending on the load balancing strategy. If a request of a HTTP session was first dispatched to Node 1 such as http://www1.myshop.com, subsequent requests might be dispatched to any nodes, such as http://www3.myshop.com.

Here you can find more information on that topic:

Does this answer your question?

Thank you,

Luis

Former Member
0 Kudos

I guess we are we are using sticky session, in this case can we get the active session in other nodes ?