Re: Session expiry and SessionListener problems with cluster

2004-12-10 Thread Christoph Kutzinski
Hi,
yes I already did know what this parameter means (though I only realised 
it after reading the source code ;), so the behaviour I described makes 
probably sense in this context.
But my concern is the following:
If a cluster completely fails, i.e. all nodes on the cluster crash 
(which is not so unlikely with small 2-3 node clusters), the session 
data is completely lost even if I can restart all nodes immediately.

In our case we have a cluster of just 2 nodes and we want to use a 
tomcat session replication (among other points) to be able to update the 
webapps without killing all user session on a node. So we would first 
stop Tomcat A, update its webapp, restart tomcat A and then the same for 
Tomcat B. If Tomcat B would now die while Tomcat A is down all session 
information would be lost.

I wanted to know if there is a way to handle this kind of situation.
TIA
Christoph
PS: do you have any information regarding point b?
Filip Hanik - Dev wrote:
expireSessionsOnShutdown="false" -> on shutdown -> expire sessions locally, but 
do not propagate to the cluster
expireSessionsOnShutdown="true" -> on shutdown -> expire sessions locally, and 
propagate to the cluster
stupid name for the variable, I agree
- Original Message - 
From: "Christoph Kutzinski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 8:00 AM
Subject: Session expiry and SessionListener problems with cluster

Hi,
I'm just "playing" with the Tomcat 5.5.4 cluster and encountered 2 oddities:
a) If have left expireSessionsOnShutdown="false" in the configuration
I understand that this will expire the session in the local node but 
leave it alive in the other cluster nodes.
However I found out that the session will expire in the local node on 
shutdown even if there are no other nodes in the cluster. So the session 
will be lost after restart.
Is this expected behaviour or a bug?

b) I implemented a session listerner for attributes.
I noticed that the attributeAdded event from DeltaManager always return 
null as the value of the event where the normal session manager will 
return the value of the attribute added. Sourcecode:

   public void attributeAdded(HttpSessionBindingEvent evt) {
// == null with DeltaManager, != null otherwise
   Object value = evt.getValue();
   // != null in both cases
   Object value1 = evt.getSession().getAttribute(evt.getName());
   }
Is this a bug?
Thanks in advance,
Christoph
-
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]


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


Re: Session expiry and SessionListener problems with cluster

2004-12-10 Thread Filip Hanik - Dev
expireSessionsOnShutdown="false" -> on shutdown -> expire sessions locally, but 
do not propagate to the cluster
expireSessionsOnShutdown="true" -> on shutdown -> expire sessions locally, and 
propagate to the cluster
stupid name for the variable, I agree

- Original Message - 
From: "Christoph Kutzinski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 09, 2004 8:00 AM
Subject: Session expiry and SessionListener problems with cluster


Hi,

I'm just "playing" with the Tomcat 5.5.4 cluster and encountered 2 oddities:

a) If have left expireSessionsOnShutdown="false" in the configuration
I understand that this will expire the session in the local node but 
leave it alive in the other cluster nodes.
However I found out that the session will expire in the local node on 
shutdown even if there are no other nodes in the cluster. So the session 
will be lost after restart.
Is this expected behaviour or a bug?

b) I implemented a session listerner for attributes.
I noticed that the attributeAdded event from DeltaManager always return 
null as the value of the event where the normal session manager will 
return the value of the attribute added. Sourcecode:

   public void attributeAdded(HttpSessionBindingEvent evt) {
// == null with DeltaManager, != null otherwise
   Object value = evt.getValue();
   // != null in both cases
   Object value1 = evt.getSession().getAttribute(evt.getName());
   }

Is this a bug?


Thanks in advance,

Christoph

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



RE: session expiry

2003-07-10 Thread harsh

you can set maximum inactive interval by
something similar to session.setMaxInactiveInterval(seconds);
(refer api )

On Thu, 10 Jul 2003, Paul Wallace wrote:

> Thank you for that. And where is the length of default session expiry
> defined? How do I configure session life span for TC?
> 
> Thanks
> 
> Paul. 
> 
> 
> > 
> >  
> > 
> > public void close() {
> > 
> >  
> 
> session.inValidate();
> 
> > 
> >   // kill my session here
> > 
> >  
> > 
> > } 
> > 
> > or failing that, how do I define a length of time for the session
> life?
> > 
> >  
> > 
> > Thanks
> > 
> >  
> > 
> > Paul.
> > 
> > 
> 
> 
> -
> 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]
> 


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



RE: session expiry

2003-07-09 Thread Krause Karin
Hi Paul,
Session timeout can be configured in the deployment descriptor of your servlet 
(web.xml).
see servlet spec 2.3
"the session-timeout element defines the default session timeout
interval for all sessions created in this web application. The
specified timeout must be expressed in a whole number of minutes.
If the timeout is 0 or less, the container ensures the default
behaviour of sessions is never to time out."

Example

30

Regards Karin

-Original Message-
From: Paul Wallace [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 10. Juli 2003 07:58
To: Tomcat Users List
Subject: RE: session expiry


Thank you for that. And where is the length of default session expiry
defined? How do I configure session life span for TC?

Thanks

Paul. 


> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session
life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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

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



RE: session expiry

2003-07-09 Thread Paul Wallace
Thank you for that. And where is the length of default session expiry
defined? How do I configure session life span for TC?

Thanks

Paul. 


> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session
life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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



Re: session expiry

2003-07-09 Thread harsh

> 
>  
> 
> public void close() {
> 
>  

session.inValidate();

> 
>   // kill my session here
> 
>  
> 
> } 
> 
> or failing that, how do I define a length of time for the session life?
> 
>  
> 
> Thanks
> 
>  
> 
> Paul.
> 
> 


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



RE: Session Expiry

2001-04-17 Thread Arik Kfir

You can't track the pressing of the Close ("X") button in your server
program. When the user presses X, the Browser doesn't notify the server that
it has closed - that is exactly why the Timeout notion was invented.. heh

so if you tried the HttpSessionBindingListener and it works for the session
timeout, that's all you can do.
HOWEVER, if you use Explorer as your client, you can code the onunload event
in DHTML and send the server a message that the user is closing the
browser...

Regards..
Arik

-Original Message-
From: Lakshmeenarayana G G [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 10:35 AM
To: Tomcat-User
Cc: [EMAIL PROTECTED]
Subject: Session Expiry


Hi..Guys and Gals...
I Have asked this question earlier..
but didn;t get the response...
please do reply me if you know the answer..

How to track the end of session..
either by timeout or by user clicking the "x" button in the browser window.
I need to do some wind up job after listening to this event.
I used HttpSessionBindingListener.
But it doesn;t track the "x" button click...

So please help me out.

Regards.

L G Goundalkar
Intertec Communications
INDIA




Re: Session Expiry

2001-04-12 Thread christophe dore

Just forget tracking the close button. There is no solution about
that 
That's what the server-side timeout has been created for... I mean that
if we could track close button hit, client computer shutdown,... there
would be no need for a server-side timeout mechanism.

> Lakshmeenarayana G G a écrit :
> 
> Hi..Guys and Gals...
> I Have asked this question earlier..
> but didn;t get the response...
> please do reply me if you know the answer..
> 
> How to track the end of session..
> either by timeout or by user clicking the "x" button in the browser
> window.
> I need to do some wind up job after listening to this event.
> I used HttpSessionBindingListener.
> But it doesn;t track the "x" button click...
> 
> So please help me out.
> 
> Regards.
> 
> L G Goundalkar
> Intertec Communications
> INDIA

-- 
Christophe Doré
Project Manager
Audientia
+33 (0)1.46.22 94 57 (office - direct)
+33 (0)1.46.22.40.00 (office - std) 
+33(0)1. 46.22.33.04 (fax) 
12 rue Le Châtelier-75017 Paris - France
http: //www.audientia.com 
---
The information transmitted is intended only for the person to whom or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or other
use
of, or taking of any action in reliance upon, this information by
persons or
entities other than the intended recipient is prohibited.If you received
this in error, please contact the sender by e-mail reply and delete and
destroy all copies of the material.