I am integrating new application developed in spring boot, Java with Old monolith, Spring MVC based application in Jboss Application Server. Login capabilities remains in same old monolith app, but I want to share session created in old application during Login in new application. I am deploying the application in same JBoss Server instance, using similar context path to ensure session is being shared across different context and wars in Jboss. Basic configurations with session sharing are already in place. finally I reach to stage where I can get same JSessionId when new application is being loaded. But issue is I am not able to access data being stored in App1 in session object.
request.getSession(false) -> is returning null in new app. Event after creating a new session using request.getsession(), I am able to get same JSessionId.
Note - I can't integrate Reddis at the moment, as it involves changes in old application.
Old Application is not persisting session to any table but still in multiple controllers of application we are able to access information stored during Login.
This is valid usecase, as we don't want customer to do Login again in new app
Am I missing something here ? Is it with java objects are not being shared ? How to achieve this ?
Referred to below pages and many such pages on internet :
Java - How to share the session between two or more Web Application?
I have deployed new application in same Jboss server, in same context path. App1 Context path -> http://host:port/app1 App2 context Path -> http://host:port/app1/app2
I am getting same JsessionId here. Used request.getSession(false) to fetch current application.