No, my utility don't remember session id. Probably it's the problem. Then
I'll need to rewrite my utility code, so that it handles it the right
way(setting cookies in headers).

Ok, but another question is whether or not Map that I get when calling
ActionContext.getContext().getSession() is thread safe?

P.S. AtomicInteger makes increment/decrement operations thread safe. Like
if you would put synchronized on each method. But it makes it a little bit
in more efficient way.

25 апреля 2012 г. 13:24 пользователь Aaron Brown
<aa...@thebrownproject.com>написал:

> To answer, I think we need to know more about your utility program that
> triggers action 2. Sessions are tracked through a cookie containing a
> JSESSIONID. Does your utility retain cookies so that each page load will
> reference the same session? Also, does your utility wait for each page to
> complete before requesting again? You said "asynchronous" but your code
> does not look thread safe to me. (I have never used atomicinteger before so
> never mind if that class somehow handles thread safety for you)
>
> Aaron
>  On Apr 25, 2012 5:11 AM, "Dionis Argiri" <dio...@gmail.com> wrote:
>
> > What is the difference between using
> > ActionContext.getContext().getSession() vs implementing SessionAware
> > interface? Does it give some advantages?
> >
> > 25 апреля 2012 г. 12:01 пользователь Łukasz Lenart <
> > lukasz.len...@googlemail.com> написал:
> >
> > > Why don't you use SessesionAware interface ?
> > >
> > >
> > > Regards
> > > --
> > > Łukasz http://www.lenart.org.pl/
> > > mobile +48 606 323 122, office +27 11 0838747
> > > Warszawa JUG conference - Confitura http://confitura.pl/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> >
>

Reply via email to