-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Maciej,

Bajolek, Maciej wrote:
> Basically the problem is: how can webAppA share the session object with
> webAppB. Both apps are deployed within the same instance of Tomact.

The servlet specification (section 7.3) specifies that session scope is
limited to a single web application, and specifically says that session
objects (or their contents) must never be shared between applications.

Given this, I don't think Tomcat itself is going to help you out, here.

> A simple example of how I want it to work is:
> 
> http://localhost/webappa/setSessionAttr.jsp   -> sets session "attr" to
> "value"
> 
> http://localhost/webappa/getSessionAttr.jsp   -> gets session "attr" ...
> and the attribute is set to "value"

This ought to work without any problems. It's when you want:

http://localhost/webappb/getSessionAttr.jsp

... to read the stuff set in webappa/setSessionAttr.jsp that it won't work.

> The only solutions I can think of are:
> 
> 1.    Implement custom SessionManager that stores/reads session
> objects in some common repository e.g.: shared library (common
> classloader)

This would work, but is fraught with difficulty because you have to
worry about releasing memory when you are finished with it.

> 2.    implement some listeners for all applications that will notify
> each other when session is created/destroyed or attrs set/unset

This is similar to #2 because you still need to store everything somewhere.

This certainly is a tough problem. :(

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjqTe4ACgkQ9CaO5/Lv0PAQYgCffqAIwfn4EEDio+35VYVH6pIq
sWkAn1itFA4DgLR4fU4keDR/bcTwrKWF
=3hiT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to