disable session timeout for session bean

Discussion in 'Java' started by June, Dec 21, 2006.

  1. June

    June Guest

    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..
     
    June, Dec 21, 2006
    #1
    1. Advertising

  2. June

    Oliver Wong Guest

    "June" <> wrote in message
    news:xlDih.87407$hn.14641@edtnps82...
    > 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
     
    Oliver Wong, Dec 21, 2006
    #2
    1. Advertising

  3. June

    June Guest

    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
     
    June, Dec 21, 2006
    #3
  4. June

    Oliver Wong Guest

    "June" <> wrote in message
    news:YlEih.87421$hn.2507@edtnps82...
    > 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
     
    Oliver Wong, Dec 21, 2006
    #4
  5. June

    Alfred Guest

    Oliver Wong wrote:
    >
    > 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
     
    Alfred, Dec 22, 2006
    #5
  6. June

    Oliver Wong Guest

    "Alfred" <> wrote in message
    news:458c052b$...
    > Oliver Wong wrote:
    >>
    >> 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.


    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
     
    Oliver Wong, Dec 22, 2006
    #6
  7. Oliver Wong wrote:
    > "Alfred" <> wrote in message
    > news:458c052b$...
    >> Oliver Wong wrote:
    >>> 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.

    >
    > 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.


    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
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Dec 24, 2006
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benjamin Stewart

    To bean or not to bean...

    Benjamin Stewart, Jun 30, 2003, in forum: Java
    Replies:
    0
    Views:
    829
    Benjamin Stewart
    Jun 30, 2003
  2. David Thielen
    Replies:
    2
    Views:
    835
    Marek Lange
    Sep 12, 2003
  3. X3
    Replies:
    0
    Views:
    433
  4. Francesco
    Replies:
    3
    Views:
    501
  5. Replies:
    1
    Views:
    730
Loading...

Share This Page