Your session is unique to - well, a session. If you have one of those then generally your problem is solved. Beware though of the situation of someone having multiple browser windows open, I suspect they all come in one session though I haven't tried it yet, so perhaps some further work is required, probably more to make sure things are thread safe rather than distinguish between different windows.

Brett Connor


Leandro Melo wrote:

I could save the reference to stateful session ejb and
jsessionid in a map in HttpSession.
This way, things wouldn't get counfusing, am i right?


--- Brett Connor <[EMAIL PROTECTED]> escreveu:


Leandro Melo wrote:



Hi,
for how long will an Action be in memory?
Here's the point.

I have a situation where the user register his/her
company in my application. He/she uses a wizard of


4


jsp pages, as he/she submits one, he/she is


redirected


to the other one. In this situation i keep a


reference


of my Stateful session ejb in HttpSession so the 4
Actions can reference them to complete the wizard.
This is pretty much fine to me.

BUT..., now i'm facing a new question. I have a
similar situation where the user can submit the


page


more than one time, and it is always the SAME


aciton


the will handle this request. It's a search page,


so


the user can search once, search again, search even
more, and it always the same action the will handel
this (behind the scenes a i got a business POJO


that


implements the ValueListHandler pattern). For this
case i also have a Statefull session ejb that
maintains a reference to my business POJO (the one
that implements the valueListHandler). Obviously,


this


Statefull sesison ejb is accessed by this one


Action


that i've been talking about.
My question is:
In the first situation i mentioned, i had to save a
reference to my Stateful session ejb in HttpSession
because 4 action would need that reference. But


what


should i do for the last situation?? Only one


Action


will handle the user requests, so can i ASSUME that
this Action will still be in memory for next


requests


and consequently this Action will still have a
reference to my my Statefull Session ejb


(naturally,


this reference would be a member of the action).??
For how long???




Don't forget that the action is not specific to one
user / session / connection. Think about the case of 2, or 100 users
all doing a search. If this is a statefull session ejb you're using I
doubt holding a reference in the action is really what you want to
do, unless I've misunderstood your situation here.


Brett Connor




---------------------------------------------------------------------


To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]









_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! http://br.acesso.yahoo.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to