Session synchronization between two web applications

Use case:

I have two web applications running on tomcat that are deployed on two different machines. One of my applications is a parent, and the other is a child. I enter my parent application and click on the link on one of the pages of the parent application. I send a browser request to my child application, which opens one of its pages in a separate browser window. In this case, I would like both of my applications to use the same timeout value and should behave as one complete application.

Scenarios for processing:

  • If I exit my parent application, my child application must also log out
  • If I close the parent window, the parent must log out with the child
  • If I close the child window, the child element must be logged off and the parent element must remain on the system
  • If both windows are closed, the parent and child should get logged out

Decision:

  • Set the time of the parent session to a certain value .. 30 minutes
  • Create a REST service for the parent .. let's say "parentisAlive ()"
  • Create a REST service for the child .. let's say "childisAlive ()"
  • Creating Parent and Child Session Listeners
  • Each session listener will reference its respective REST service.
  • REST service will talk to each other based on sessionID native application
  • The parent will request a child session identifier (memory / DB) and vice versa
  • , - .. 20
  • REST, .

- , , - ?

+3
1

Tomcats . , - , .

0

All Articles