Shared Session Context

The Servlet specification defines session scope at the Web Application level, session information stored by one web application cannot be shared by other web applications even in the same enterprise application.WebSphere Application Server provides an IBM extension, that allows sharing the session information to be shared among web applications within an enterprise application. This option is offered as an extension to the application deployment descriptor.


In order to try this scenario i tried creating a Simple SessionContextSampleEAR. It has two .war files and each .war file has one servlet each. I am setting the session attribute in one servlet and accessing it in another and it works.

You can enalbe shared session context using RAD or IBM WAS Toolkit during the application assembly phase like this




Now if you check ibm-application-ext.xmi file in you .ear files META-INF folder you will see that value of sharedSessionContext attribute is set to true like this


<applicationext:ApplicationExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:applicationext="applicationext.xmi" xmi:id="ApplicationExtension_1250896346141" sharedSessionContext="true">
<application href="META-INF/application.xml#Application_ID"/>
</applicationext:ApplicationExtension>

2 comments:

EG MEDI said...

Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online.
Cash on Delivery available. Free Home Delivery


Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store

Vikas Chaudhary said...


BatteryMantra is authorized exide battery dealer in Noida.
We also provide car battery, ups battery and invertor battery all major brands like luminous, exide, etc. Buy Battery Online for best battery.
http://www.batterymantra.com