Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

disable session timeout for session bean

Thread view: 
June - 21 Dec 2006 21:51 GMT
Is it possible to disable the timeout for a statefull session bean?

I want to make this session bean to live as long as client won't logout.
So if client logins in and do nothing this session will be there..
Oliver Wong - 21 Dec 2006 22:40 GMT
> Is it possible to disable the timeout for a statefull session bean?
>
> I want to make this session bean to live as long as client won't logout.
> So if client logins in and do nothing this session will be there..

   You could try setting the lifetime of the session to 80 (million) years.
That's about equivalent for most intents and purposes.

   - Oliver
June - 21 Dec 2006 23:00 GMT
Thanks, Oliver

If the client logs out by mistake say you accidently turn off
the pc, the session will be alive for the rest of my life as long
as I don't shutdown the server?

June
Oliver Wong - 21 Dec 2006 23:13 GMT
> Thanks, Oliver
>
> If the client logs out by mistake say you accidently turn off
> the pc, the session will be alive for the rest of my life as long
> as I don't shutdown the server?

   Depends on how the session is implemented. If it's implemented via
cookies, then the session can "disappear" if the client deletes or otherwise
doesn't send the cookie. Otherwise, it should last as long as the server
"remembers" open sessions. On the systems I'm familiar with, the sessions
are usually persisted to harddisk, so as long as the harddisk doesn't get
corrupted, the session should still be around.

   - Oliver
Alfred - 22 Dec 2006 16:17 GMT
>     Depends on how the session is implemented. If it's implemented via
> cookies, then the session can "disappear" if the client deletes or otherwise
> doesn't send the cookie. Otherwise, it should last as long as the server
> "remembers" open sessions. On the systems I'm familiar with, the sessions
> are usually persisted to harddisk, so as long as the harddisk doesn't get
> corrupted, the session should still be around.

Are you shure about difference between Web- and EJB-Container?
Lifecycle Management of SessionBean is a part of EJB-Container.

Alfred
Oliver Wong - 22 Dec 2006 16:51 GMT
>>     Depends on how the session is implemented. If it's implemented via
>> cookies, then the session can "disappear" if the client deletes or
[quoted text clipped - 5 lines]
> Are you shure about difference between Web- and EJB-Container?
> Lifecycle Management of SessionBean is a part of EJB-Container.

   I'm not (sure, that is). I haven't worked much with JSPs at all, and my
experiences are mostly with PHP. I noticed that the way they handle sessions
seemed (as far as I could see) to be similar, so I thought it was safe for
me to dispense my advice.

   - Oliver
Arne Vajhøj - 24 Dec 2006 17:32 GMT
>>>     Depends on how the session is implemented. If it's implemented via
>>> cookies, then the session can "disappear" if the client deletes or
[quoted text clipped - 9 lines]
> seemed (as far as I could see) to be similar, so I thought it was safe for
> me to dispense my advice.

Even though it is very common to use:

browser----JSP/servlet----EJB----database

then it could be:

Swing app----EJB----database

EJB's does not speak HTTP and does not use cookies/URL rewriting.

JSP pages and servlets does.

Arne


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.