struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad A Cupit" <b...@lsu.edu>
Subject RE: Best way to access Session with regards to cluster
Date Wed, 30 Apr 2008 16:40:49 GMT
> but I still have some confusion about the proper way to do
> this so that my session values will be available and
> replicated properly in a cluster environment.

The Struts 2 session maps are actually just wrappers around the real
underlying session. The methods that return (or set) a
HttpServletRequest should provide the actual http session.

Basically, once you have setup replicated sessions in your app server,
Struts 2 should work with it automatically, no matter which method you
choose to get the session.

I believe implementing SessionAware is the recommended approach, as it
doesn't tie your actions to the servlet api (making them more portable
and easier to test).

Not sure about getting the session in an interceptor though...

Brad Cupit
Louisiana State University - UIS

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message