Java :: Sharing HTTP session with multiple different applications in weblogic sever

Sharing Http Session State between Web applications in weblogic is not that simple case you can resolve. It will need lots of configuration in  weblogic and need to in one EAR file too.

 Configuration of sharing Http Session 

•Should be deployed in one EAR file.
•Build script(ANT) should be modified to move war files to one place and manual construction for weblogic-application.xml
•Enable to share session in weblogic
•Enable URL rewriting for session tracking

 

Weblogic-Application.xml

 

<?xml version = ‘1.0’ encoding = ‘windows-1252’?>

<application xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd” version=”5″ xmlns=”http://java.sun.com/xml/ns/javaee”>

<display-name>application2</display-name>

<module>

<ejb>ejb1.jar</ejb>

</module>

<module>

<web>

<web-uri>session1test_ViewController_webapp.war</web-uri>

<context-root>session1test-ViewController-context-root</context-root>

</web>

</module>

<module>

<web>

<web-uri>session4_ViewController_webapp.war</web-uri>

<context-root>session4-ViewController-context-root</context-root>

</web>

</module>

</application>

 

 

 

Persistent User Session Management

1.Memory:

– Pros: Fast & Not many changes in RIS-I

–  Cons:  Possible failure case in failover.

2.Database:

–   Pros: Safe on many failover.

–  Cons : Will be slower than memory

 

 

error: Content is protected !!