1

I have WAS(Websphere Application Server) 6.1 and RSA (Rational Software Architect) 7.0 I want to share session between two different application in same server and under same EAR.

I tried this

http://pic.dhe.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tprs_sharing_data.html

but in RSA does not show me "Deployment Descriptor Editor" option when I right click on my EAR.

Somehow I believe it adds "Shared session context" extension in "ibm-application-ext.xmi". I tried to add

<shared-session-context value="true"/>

in this file but server throw

Feature 'shared-session-context' not found. (file:///D:/Appl/IBM/SDP70/runtimes/base_v61/profiles/AppSrv01/META-INF/ibm-application-ext.xmi, 4, 27)

Am I missing something?

martin clayton
  • 76,436
  • 32
  • 213
  • 198
Bilal Mirza
  • 2,576
  • 4
  • 30
  • 57

1 Answers1

1

In RAD/RSA, you access the Deployment Descriptor Editor by expanding your EAR project and opening the application.xml file. I'm on a newer version of RAD (and WebSphere), but I expect this will be the same location.

On the first tab of the editor, the Overview tab, check the "Shared session context" box. When you save, this will create or modify your ibm-application-ext.xmi file.

Further, when you look at the source of that, you'll see that the actual way it's written (again for my WebSphere 6.1 in this case) is as an attribute in the <applicationext:ApplicationExtension> element, and with a slightly different name than what you used:

<applicationext:ApplicationExtension ... sharedSessionContext="true">
dbreaux
  • 4,982
  • 1
  • 25
  • 64
  • 1
    I was working on an old EAR which does not show "Shared session context" in Deployment Descriptor editor. I created a new EAR with two new application and check box is there. I tested it and it worked. ------ But here is something I'd like to share. EAR should use single class loader. If classes are loaded by wars separately and you have shared an object of String type in one application, When it is got in other application, it will be incompatible with String class of other application because both String class is loaded by separate class loaders and object only belongs to one of them. – Bilal Mirza Sep 17 '12 at 12:55
  • I made the same change in "ibm-application-ext.xmi" and it worked. Thanks dbreaux. – Bilal Mirza Sep 17 '12 at 13:08