Depends on whether it is a stateless or stateful session bean. There is no way of knowing (outside of a server crash) when a stateless bean will be destroyed.
Mark -----Original Message----- From: Otavio C. Decio [mailto:[EMAIL PROTECTED]] Sent: Friday, March 15, 2002 12:05 PM To: Struts Users Mailing List Subject: Re: problem with bean having session scope AFAIK, a session bean is destroyed when the session expires (30 min by default). Otavio ----- Original Message ----- From: "Slimane Zouggari" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, March 15, 2002 12:02 PM Subject: Re: problem with bean having session scope > well as nobody seems to have a clue about my problem. I'll ask my question > differently :) > > When is a session bean destroyed ? > If I specify, a form bean to have a session scope (as I did in the > struts-config.xml), when will it be destroyed ? > > I suppose the form bean is created the first time I use a jsp:useBean tag > in my jsp file, isn't it ? > > (for example: <jsp:useBean id="searchbydateform" scope="session" > class="be.stluc.info.struts.SearchByDateForm"/>) > > Finally, what could be the reasons, that some of my Action classes see (can > use their values) some session beans, while others don't ? > > Thanx for having taken the time to read me :) > > Friendly Regards, > Slimane > > At 12:11 15/03/2002 +0100, you wrote: > >Hi, > > > >I have 3 form beans. Each of them have a session scope defined in the > >struts-config.xml. > > > >Here's the config for one of them: > >> <action path="/piechart" > >> type="be.stluc.info.struts.PieChartAction" > >> name="piechartform" > >> scope="session"> > > > >When I try to access them in one of my Action class, I don't have any problem. > >But when I try to access them, from one other Action class, then suddenly, > >they don't exist anymore. > > > >I used the piece of code, Mr Keith Bacon posted in reply of one of my > >previous mail ( > >http://www.mail-archive.com/struts-user@jakarta.apache.org/msg25984.html ) > > > >And that so, I saw that one time, my session contains all three form beans > >and another time my session contains only one form bean. > > > >Here's the code I use in my Action classes: > > > >> ParticipantDetailsForm partDetForm = > >> (ParticipantDetailsForm) > >> request.getSession().getAttribute("participantdetailsform"); > > > >(participantdetailsform is one of the 3 form beans I share in the session) > > > >Could anyone give me pointers where I should look for ? Because, I'm sure > >it's a stupid mistake but I can't find it :( > > > >Thanx in advance. > > > >Friendly Regards, > >Slimane > > > > > >-- > >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>