RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

Thanks for your reply.

 

But can you specify exactly which Servlets API method to use?

 

Note that Tomat-5.5.12 is deployed on Production environment and we are not 
facing major issues.

 

I will appreciate if you can adivse to which Tomcat Stable version we should 
Migrate taking in consideration that Tomcat Cluster is used in our environment 
as well.

 

 



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 10:15:58 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 On 17/11/2009 04:14, Imad Hachem wrote:
 
  Dear all,
 
  I am using Tomcat-5.5.12 as Clustering nodes, and after one node
  shutdown sessionDestroyed is called before contextDestroyed.
 
 Are you still using 5.5.12? Hasn't anyone advised you to upgrade to a 
 newer version yet?
 
 I think it's perfectly reasonably to call sessionDestroyed() before 
 contextDestroyed().
 
  How can I know if sessionDestroyed is called from session.invalidate()
  from the real expiration of the session or shutdown of one cluster node?
 
 You can't know this directly from the Servlet API methods.
 
  Note that on sessionDestroyed event, I am using a Logout behavior to
  logout my users from the DATABASE.
 
  I have tried to set a KEY on the context (or application scope) to check
  on it during the sessionDestroyed event, but it seems the context is
  destroyed after the session destroy event.
 
 This comes up not infrequently on the list, the archives have more 
 information:
 
 http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-p16746969.html
 
  Is there any event listener that I can use before the sessionDestroyed to 
  differentiate if one cluster node has been shutdown or my session has been 
  expired?
 
  Or is how to configure the contextDestroy to be called before the sessions 
  destroy?
 
 No, contextDestroyed() means that the web application itself has been 
 stopped, this is mandated by the Servlet Spec.
 
 
 p
 
 
  Thanks in advance for your help.
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
  
  _
  Windows Live: Make it easier for your friends to see what you’re up to on 
  Facebook.
  http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
Keep your friends updated―even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

I have tried that code and didn't helped, note that my context  session 
variables are not coming as null in order to rely on to be able to 
differenciate between Tomcat Node shutdown  session.invalidate().

 

 



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 11:41:20 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 On 17/11/2009 11:31, Imad Hachem wrote:
 
  Dear Pid,
 
  Thanks for your reply.
 
  But can you specify exactly which Servlets API method to use?
 
 The link I sent had some code in it, did you read it?
 
  Note that Tomat-5.5.12 is deployed on Production environment and we are not 
  facing major issues.
 
 But you might be facing some security ones.
 
  I will appreciate if you can adivse to which Tomcat Stable version we 
  should Migrate taking in consideration that Tomcat Cluster is used in our 
  environment as well.
 
 The latest: Tomcat 5.5.28. Same app, many bugfixes. Your version was 
 released September 2005, over 4 years ago (that's 28 internet years).
 
 It's not good practice to avoid upgrading for that long.
 
 
 p
 
 
 
 
 
 
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 10:15:58 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
  sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 04:14, Imad Hachem wrote:
 
  Dear all,
 
  I am using Tomcat-5.5.12 as Clustering nodes, and after one node
  shutdown sessionDestroyed is called before contextDestroyed.
 
  Are you still using 5.5.12? Hasn't anyone advised you to upgrade to a
  newer version yet?
 
  I think it's perfectly reasonably to call sessionDestroyed() before
  contextDestroyed().
 
  How can I know if sessionDestroyed is called from session.invalidate()
  from the real expiration of the session or shutdown of one cluster node?
 
  You can't know this directly from the Servlet API methods.
 
  Note that on sessionDestroyed event, I am using a Logout behavior to
  logout my users from the DATABASE.
 
  I have tried to set a KEY on the context (or application scope) to check
  on it during the sessionDestroyed event, but it seems the context is
  destroyed after the session destroy event.
 
  This comes up not infrequently on the list, the archives have more
  information:
 
  http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-p16746969.html
 
  Is there any event listener that I can use before the sessionDestroyed to 
  differentiate if one cluster node has been shutdown or my session has 
  been expired?
 
  Or is how to configure the contextDestroy to be called before the 
  sessions destroy?
 
  No, contextDestroyed() means that the web application itself has been
  stopped, this is mandated by the Servlet Spec.
 
 
  p
 
 
  Thanks in advance for your help.
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
  _
  Windows Live: Make it easier for your friends to see what you’re up to on 
  Facebook.
  http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
  _
  Keep your friends updated―even when you’re not signed in.
  http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
  
_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

I am running a Logout Process at each sessionDestroy.

 

After applying the Cluster configuration,  I don't want to Logout my Users (or 
run this Logout Process) after any Tomcat Cluster node shutdown, since the 
Session has been replicated to the other Node Cluster.

 



Best Regards,
Imad Hachem 

System Engineer 



 
 From: p...@pidster.com
 Date: Tue, 17 Nov 2009 13:09:47 +
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 To: users@tomcat.apache.org
 
 On 17 Nov 2009, at 12:11, Imad Hachem hachem_i...@hotmail.com wrote:
 
 
  Dear Pid,
 
 
 
  I have tried that code and didn't helped, note that my context 
  session variables are not coming as null in order to rely on to be
  able to differenciate between Tomcat Node shutdown 
  session.invalidate().
 
 I'm sorry but I don't understand what you're saying here.
 
 Tomcat  the servlet api can't tell you the difference between an app
 shutdown and a session expiry without you writing code.
 
 What did you try?
 
 What was or wasn't null exactly?
 
 p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 11:41:20 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 11:31, Imad Hachem wrote:
 
  Dear Pid,
 
  Thanks for your reply.
 
  But can you specify exactly which Servlets API method to use?
 
  The link I sent had some code in it, did you read it?
 
  Note that Tomat-5.5.12 is deployed on Production environment and
  we are not facing major issues.
 
  But you might be facing some security ones.
 
  I will appreciate if you can adivse to which Tomcat Stable version
  we should Migrate taking in consideration that Tomcat Cluster is
  used in our environment as well.
 
  The latest: Tomcat 5.5.28. Same app, many bugfixes. Your version was
  released September 2005, over 4 years ago (that's 28 internet years).
 
  It's not good practice to avoid upgrading for that long.
 
 
  p
 
 
 
 
 
 
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 10:15:58 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 04:14, Imad Hachem wrote:
 
  Dear all,
 
  I am using Tomcat-5.5.12 as Clustering nodes, and after one node
  shutdown sessionDestroyed is called before contextDestroyed.
 
  Are you still using 5.5.12? Hasn't anyone advised you to upgrade
  to a
  newer version yet?
 
  I think it's perfectly reasonably to call sessionDestroyed() before
  contextDestroyed().
 
  How can I know if sessionDestroyed is called from
  session.invalidate()
  from the real expiration of the session or shutdown of one
  cluster node?
 
  You can't know this directly from the Servlet API methods.
 
  Note that on sessionDestroyed event, I am using a Logout
  behavior to
  logout my users from the DATABASE.
 
  I have tried to set a KEY on the context (or application scope)
  to check
  on it during the sessionDestroyed event, but it seems the
  context is
  destroyed after the session destroy event.
 
  This comes up not infrequently on the list, the archives have more
  information:
 
  http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-p16746969.html
 
  Is there any event listener that I can use before the
  sessionDestroyed to differentiate if one cluster node has been
  shutdown or my session has been expired?
 
  Or is how to configure the contextDestroy to be called before
  the sessions destroy?
 
  No, contextDestroyed() means that the web application itself has
  been
  stopped, this is mandated by the Servlet Spec.
 
 
  p
 
 
  Thanks in advance for your help.
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
  _
  Windows Live: Make it easier for your friends to see what yo
  u锟斤拷re up to on Facebook.
  http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009
 
 
  ---
  --
  To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
  For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
  _
  Keep your friends updated锟斤拷even when you锟斤拷re not
  signed in.
  http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010
 
 
  -
  To unsubscribe, e-mail: users-unsubscr

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Hi Ronald,

 

Thanks for your reply.

 

So, what 's the solution in my Case?

 

I need to differentiate between Tomat Cluster node shutdown and 
session.invalidate and session Timout?

 

Is that Possible as configuration or Programming ?

 

 



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 15:40:30 +0100
 From: ronald-mailingl...@base.nl
 To: users@tomcat.apache.org
 Subject: RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 Hi Imad,
 
 I think also that Tomcat should only invalidate the Session on shutdown if it 
 is the last node in the cluster.
 But the developers of Tomcat think of it as invalidating the Session object 
 (as in java Object) and you and me see it as invalidating the session of the 
 user.
 
 Ronald. (The Ronald of the link mentioned by Pid.)
 
 
 Op dinsdag, 17 november 2009 14:36 schreef Imad Hachem 
 hachem_i...@hotmail.com:
  
  
  
  
  Dear Pid,
  
  
  
  I am running a Logout Process at each sessionDestroy.
  
  
  
  After applying the Cluster configuration, I don't want to Logout my Users 
  (or run this Logout Process) after any Tomcat Cluster node shutdown, since 
  the Session has been replicated to the other Node Cluster.
  
  
  
  
  
  Best Regards,
  Imad Hachem 
  
  System Engineer 
  
  
  
  
   From: p...@pidster.com
   Date: Tue, 17 Nov 2009 13:09:47 +
   Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
   sessionDestroyed been called before contextDestroyed
   To: users@tomcat.apache.org
   
   On 17 Nov 2009, at 12:11, Imad Hachem hachem_i...@hotmail.com wrote:
   
   
Dear Pid,
   
   
   
I have tried that code and didn't helped, note that my context 
session variables are not coming as null in order to rely on to be
able to differenciate between Tomcat Node shutdown 
session.invalidate().
   
   I'm sorry but I don't understand what you're saying here.
   
   Tomcat  the servlet api can't tell you the difference between an app
   shutdown and a session expiry without you writing code.
   
   What did you try?
   
   What was or wasn't null exactly?
   
   p
   
   
Best Regards,
Imad Hachem
   
System Engineer
   
   
   
   
Date: Tue, 17 Nov 2009 11:41:20 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
shutdown, sessionDestroyed been called before contextDestroyed
   
On 17/11/2009 11:31, Imad Hachem wrote:
   
Dear Pid,
   
Thanks for your reply.
   
But can you specify exactly which Servlets API method to use?
   
The link I sent had some code in it, did you read it?
   
Note that Tomat-5.5.12 is deployed on Production environment and
we are not facing major issues.
   
But you might be facing some security ones.
   
I will appreciate if you can adivse to which Tomcat Stable version
we should Migrate taking in consideration that Tomcat Cluster is
used in our environment as well.
   
The latest: Tomcat 5.5.28. Same app, many bugfixes. Your version was
released September 2005, over 4 years ago (that's 28 internet years).
   
It's not good practice to avoid upgrading for that long.
   
   
p
   
   
   
   
   
   
   
   
Best Regards,
Imad Hachem
   
System Engineer
   
   
   
   
Date: Tue, 17 Nov 2009 10:15:58 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
shutdown, sessionDestroyed been called before contextDestroyed
   
On 17/11/2009 04:14, Imad Hachem wrote:
   
Dear all,
   
I am using Tomcat-5.5.12 as Clustering nodes, and after one node
shutdown sessionDestroyed is called before contextDestroyed.
   
Are you still using 5.5.12? Hasn't anyone advised you to upgrade
to a
newer version yet?
   
I think it's perfectly reasonably to call sessionDestroyed() before
contextDestroyed().
   
How can I know if sessionDestroyed is called from
session.invalidate()
from the real expiration of the session or shutdown of one
cluster node?
   
You can't know this directly from the Servlet API methods.
   
Note that on sessionDestroyed event, I am using a Logout
behavior to
logout my users from the DATABASE.
   
I have tried to set a KEY on the context (or application scope)
to check
on it during the sessionDestroyed event, but it seems the
context is
destroyed after the session destroy event.
   
This comes up not infrequently on the list, the archives have more
information:
   
http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node-in-the-cluster-p16746969.html
   
Is there any event listener that I can use before the
sessionDestroyed to differentiate if one cluster node has been
shutdown or my

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

I have tried to set application context variables, but it didn't worked, since 
I m expecting to get these variables as null values after node shutdown, but in 
fact they are coming as not null.

 



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 15:38:22 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 On 17/11/2009 14:40, Ronald Klop wrote:
  Hi Imad,
 
  Ronald. (The Ronald of the link mentioned by Pid.)
 
 Did the code supplied therein, work for you Ronald?
 
 
 @Imad
 
 The Servlet Spec (and therefore Tomcat) doesn't differentiate between 
 causes of session expiry.
 
 The code requires you to set a value in the application scope, then the 
 HttpSessionListener sessionDestroyed method checks for that value.
 
 If the value is present, you initiated shutdown. If it is not, then 
 it's probably a session expiry and you run your logout code.
 
 Did you actually set such an attribute?
 
 
 p
 
 
  Op dinsdag, 17 november 2009 14:36 schreef Imad Hachem
  hachem_i...@hotmail.com:
 
 
 
 
  Dear Pid,
 
 
 
  I am running a Logout Process at each sessionDestroy.
 
 
 
  After applying the Cluster configuration, I don't want to Logout my
  Users (or run this Logout Process) after any Tomcat Cluster node
  shutdown, since the Session has been replicated to the other Node
  Cluster.
 
 
 
 
 
  Best Regards,
  Imad Hachem
  System Engineer
 
 
 
   From: p...@pidster.com
   Date: Tue, 17 Nov 2009 13:09:47 +
   Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
   To: users@tomcat.apache.org
On 17 Nov 2009, at 12:11, Imad Hachem hachem_i...@hotmail.com
  wrote:

Dear Pid,
   
   
   
I have tried that code and didn't helped, note that my context 
session variables are not coming as null in order to rely on to be
able to differenciate between Tomcat Node shutdown 
session.invalidate().
I'm sorry but I don't understand what you're saying here.
Tomcat  the servlet api can't tell you the difference between an app
   shutdown and a session expiry without you writing code.
What did you try?
What was or wasn't null exactly?
p
  Best Regards,
Imad Hachem
   
System Engineer
   
   
   
   
Date: Tue, 17 Nov 2009 11:41:20 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
shutdown, sessionDestroyed been called before contextDestroyed
   
On 17/11/2009 11:31, Imad Hachem wrote:
   
Dear Pid,
   
Thanks for your reply.
   
But can you specify exactly which Servlets API method to use?
   
The link I sent had some code in it, did you read it?
   
Note that Tomat-5.5.12 is deployed on Production environment and
we are not facing major issues.
   
But you might be facing some security ones.
   
I will appreciate if you can adivse to which Tomcat Stable version
we should Migrate taking in consideration that Tomcat Cluster is
used in our environment as well.
   
The latest: Tomcat 5.5.28. Same app, many bugfixes. Your version was
released September 2005, over 4 years ago (that's 28 internet
  years).
   
It's not good practice to avoid upgrading for that long.
   
   
p
   
   
   
   
   
   
   
   
Best Regards,
Imad Hachem
   
System Engineer
   
   
   
   
Date: Tue, 17 Nov 2009 10:15:58 +
From: p...@pidster.com
To: users@tomcat.apache.org
Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
shutdown, sessionDestroyed been called before contextDestroyed
   
On 17/11/2009 04:14, Imad Hachem wrote:
   
Dear all,
   
I am using Tomcat-5.5.12 as Clustering nodes, and after one node
shutdown sessionDestroyed is called before contextDestroyed.
   
Are you still using 5.5.12? Hasn't anyone advised you to upgrade
to a
newer version yet?
   
I think it's perfectly reasonably to call sessionDestroyed()
  before
contextDestroyed().
   
How can I know if sessionDestroyed is called from
session.invalidate()
from the real expiration of the session or shutdown of one
cluster node?
   
You can't know this directly from the Servlet API methods.
   
Note that on sessionDestroyed event, I am using a Logout
behavior to
logout my users from the DATABASE.
   
I have tried to set a KEY on the context (or application scope)
to check
on it during the sessionDestroyed event, but it seems the
context is
destroyed after the session destroy event.
   
This comes up not infrequently on the list, the archives have more
information:
   
   
  http://old.nabble.com/Re%3A-sessionListener.sessionDestroyed-is-called-on-shutdown-of-a-node

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

I am expecting them to come as null to know that the Tomcat Node (or context) 
has been shutdown.

 



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 16:08:37 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 CC: ihac...@lb.path-solutions.com
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 On 17/11/2009 15:57, Imad Hachem wrote:
 
  Dear Pid,
 
  I have tried to set application context variables, but it didn't worked, 
  since I m expecting to get these variables as null values after node 
  shutdown, but in fact they are coming as not null.
 
 If you set them as not null and they are not null why are you surprised?
 
 Why do you expect them to be null?
 
 
 p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 15:38:22 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
  sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 14:40, Ronald Klop wrote:
  Hi Imad,
 
  Ronald. (The Ronald of the link mentioned by Pid.)
 
  Did the code supplied therein, work for you Ronald?
 
 
  @Imad
 
  The Servlet Spec (and therefore Tomcat) doesn't differentiate between
  causes of session expiry.
 
  The code requires you to set a value in the application scope, then the
  HttpSessionListener sessionDestroyed method checks for that value.
 
  If the value is present, you initiated shutdown. If it is not, then
  it's probably a session expiry and you run your logout code.
 
  Did you actually set such an attribute?
 
 
  p
 
 
  Op dinsdag, 17 november 2009 14:36 schreef Imad Hachem
  hachem_i...@hotmail.com:
 
 
 
 
  Dear Pid,
 
 
 
  I am running a Logout Process at each sessionDestroy.
 
 
 
  After applying the Cluster configuration, I don't want to Logout my
  Users (or run this Logout Process) after any Tomcat Cluster node
  shutdown, since the Session has been replicated to the other Node
  Cluster.
 
 
 
 
 
  Best Regards,
  Imad Hachem
  System Engineer
 
 
 
  From: p...@pidster.com
  Date: Tue, 17 Nov 2009 13:09:47 +
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
  To: users@tomcat.apache.org
  On 17 Nov 2009, at 12:11, Imad Hachemhachem_i...@hotmail.com
  wrote:
 
  Dear Pid,
 
 
 
  I have tried that code and didn't helped, note that my context
  session variables are not coming as null in order to rely on to be
  able to differenciate between Tomcat Node shutdown
  session.invalidate().
  I'm sorry but I don't understand what you're saying here.
  Tomcat the servlet api can't tell you the difference between an app
  shutdown and a session expiry without you writing code.
  What did you try?
  What was or wasn't null exactly?
  p
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 11:41:20 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 11:31, Imad Hachem wrote:
 
  Dear Pid,
 
  Thanks for your reply.
 
  But can you specify exactly which Servlets API method to use?
 
  The link I sent had some code in it, did you read it?
 
  Note that Tomat-5.5.12 is deployed on Production environment and
  we are not facing major issues.
 
  But you might be facing some security ones.
 
  I will appreciate if you can adivse to which Tomcat Stable version
  we should Migrate taking in consideration that Tomcat Cluster is
  used in our environment as well.
 
  The latest: Tomcat 5.5.28. Same app, many bugfixes. Your version was
  released September 2005, over 4 years ago (that's 28 internet
  years).
 
  It's not good practice to avoid upgrading for that long.
 
 
  p
 
 
 
 
 
 
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 10:15:58 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 04:14, Imad Hachem wrote:
 
  Dear all,
 
  I am using Tomcat-5.5.12 as Clustering nodes, and after one node
  shutdown sessionDestroyed is called before contextDestroyed.
 
  Are you still using 5.5.12? Hasn't anyone advised you to upgrade
  to a
  newer version yet?
 
  I think it's perfectly reasonably to call sessionDestroyed()
  before
  contextDestroyed().
 
  How can I know if sessionDestroyed is called from
  session.invalidate()
  from the real expiration of the session or shutdown of one
  cluster node?
 
  You can't know this directly from the Servlet API methods.
 
  Note that on sessionDestroyed event, I am using a Logout
  behavior to
  logout my users from the DATABASE.
 
  I have

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

find below my explanation:

 

 1. Manually set an attribute (e.g. MANUAL_STOP=1) in application scope
 2. Manually shutdown Tomcat instance.
 3. Tomcat expires all sessions
 4. Tomcat fires HttpSessionListener.sessionDestroyed for each session
 5. custom code checks for, and finds, attribute (e.g. MANUAL_STOP=1)
  if(MANUAL_STOP == null){  // Tomcat Cluster Node Shutdown

//don't do anything

  }

  else{  //  case of session.invalidate or session timeout

  6. custom code does logout per session
  }

8. Tomcat fires ServletContextListener.contextDestroyed for each app


 

But in fact, the variable MANUAL_STOP saved to the application scope is always 
coming as 1, even after tomcat cluster node shutdown which expected to come as 
null.

 

I need to know if my sessionDestroyed has been called from a session.invalidate 
Event OR session timeout OR Tomcat Cluster node shutdown.



Best Regards,
Imad Hachem 

System Engineer 



 
 Date: Tue, 17 Nov 2009 16:23:16 +
 From: p...@pidster.com
 To: users@tomcat.apache.org
 CC: ihac...@lb.path-solutions.com
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 
 On 17/11/2009 16:11, Imad Hachem wrote:
 
  Dear Pid,
 
  I am expecting them to come as null to know that the Tomcat Node (or 
  context) has been shutdown.
 
 That makes no sense. These are the logical steps.
 
 1. Manually set an attribute (e.g. MANUAL_STOP=1) in application scope
 2. Manually shutdown Tomcat instance.
 3. Tomcat expires all sessions
 4. Tomcat fires HttpSessionListener.sessionDestroyed for each session
 5. custom code checks for, and finds, attribute (e.g. MANUAL_STOP=1)
 6. custom code does logout per session
 8. Tomcat fires ServletContextListener.contextDestroyed for each app
 
 
 Perhaps you can explain, clearly, what you expect to happen and where it 
 happens?
 
 
 p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 16:08:37 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  CC: ihac...@lb.path-solutions.com
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
  sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 15:57, Imad Hachem wrote:
 
  Dear Pid,
 
  I have tried to set application context variables, but it didn't worked, 
  since I m expecting to get these variables as null values after node 
  shutdown, but in fact they are coming as not null.
 
  If you set them as not null and they are not null why are you 
  surprised?
 
  Why do you expect them to be null?
 
 
  p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 15:38:22 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node 
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 14:40, Ronald Klop wrote:
  Hi Imad,
 
  Ronald. (The Ronald of the link mentioned by Pid.)
 
  Did the code supplied therein, work for you Ronald?
 
 
  @Imad
 
  The Servlet Spec (and therefore Tomcat) doesn't differentiate between
  causes of session expiry.
 
  The code requires you to set a value in the application scope, then the
  HttpSessionListener sessionDestroyed method checks for that value.
 
  If the value is present, you initiated shutdown. If it is not, then
  it's probably a session expiry and you run your logout code.
 
  Did you actually set such an attribute?
 
 
  p
 
 
  Op dinsdag, 17 november 2009 14:36 schreef Imad Hachem
  hachem_i...@hotmail.com:
 
 
 
 
  Dear Pid,
 
 
 
  I am running a Logout Process at each sessionDestroy.
 
 
 
  After applying the Cluster configuration, I don't want to Logout my
  Users (or run this Logout Process) after any Tomcat Cluster node
  shutdown, since the Session has been replicated to the other Node
  Cluster.
 
 
 
 
 
  Best Regards,
  Imad Hachem
  System Engineer
 
 
 
  From: p...@pidster.com
  Date: Tue, 17 Nov 2009 13:09:47 +
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
  To: users@tomcat.apache.org
  On 17 Nov 2009, at 12:11, Imad Hachemhachem_i...@hotmail.com
  wrote:
 
  Dear Pid,
 
 
 
  I have tried that code and didn't helped, note that my context
  session variables are not coming as null in order to rely on to be
  able to differenciate between Tomcat Node shutdown
  session.invalidate().
  I'm sorry but I don't understand what you're saying here.
  Tomcat the servlet api can't tell you the difference between an app
  shutdown and a session expiry without you writing code.
  What did you try?
  What was or wasn't null exactly?
  p
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 11:41:20 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re

RE: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-17 Thread Imad Hachem

Dear Pid,

 

After one Tomcat Cluster node shutdown, what kind of variables  (that might 
come as null) I should rely on to know that my node has been stoped.

 



Best Regards,
Imad Hachem 

System Engineer 



 
 From: p...@pidster.com
 Date: Wed, 18 Nov 2009 00:19:07 +
 Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, 
 sessionDestroyed been called before contextDestroyed
 To: users@tomcat.apache.org
 
 On 18 Nov 2009, at 00:07, Imad Hachem hachem_i...@hotmail.com wrote:
  Dear Pid,
  find below my explanation:
 
  1. Manually set an attribute (e.g. MANUAL_STOP=1) in application scope
  2. Manually shutdown Tomcat instance.
  3. Tomcat expires all sessions
  4. Tomcat fires HttpSessionListener.sessionDestroyed for each session
  5. custom code checks for, and finds, attribute (e.g. MANUAL_STOP=1)
  if(MANUAL_STOP == null){ // Tomcat Cluster Node Shutdown
 
  //don't do anything
 
  }
 
  else{ // case of session.invalidate or session timeout
 
  6. custom code does logout per session
  }
 
  8. Tomcat fires ServletContextListener.contextDestroyed for each app
 
  But in fact, the variable MANUAL_STOP saved to the application scope
  is always coming as 1, even after tomcat cluster node shutdown which
  expected to come as null.
 
 Yes. The value 1 is expected - you're not explaining why you think it
 should be null.
 
 p
 
 
 
 
 
  I need to know if my sessionDestroyed has been called from a
  session.invalidate Event OR session timeout OR Tomcat Cluster node
  shutdown.
 
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 16:23:16 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  CC: ihac...@lb.path-solutions.com
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 16:11, Imad Hachem wrote:
 
  Dear Pid,
 
  I am expecting them to come as null to know that the Tomcat Node
  (or context) has been shutdown.
 
  That makes no sense. These are the logical steps.
 
  1. Manually set an attribute (e.g. MANUAL_STOP=1) in application
  scope
  2. Manually shutdown Tomcat instance.
  3. Tomcat expires all sessions
  4. Tomcat fires HttpSessionListener.sessionDestroyed for each session
  5. custom code checks for, and finds, attribute (e.g. MANUAL_STOP=1)
  6. custom code does logout per session
  8. Tomcat fires ServletContextListener.contextDestroyed for each app
 
 
  Perhaps you can explain, clearly, what you expect to happen and
  where it
  happens?
 
 
  p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 16:08:37 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  CC: ihac...@lb.path-solutions.com
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 15:57, Imad Hachem wrote:
 
  Dear Pid,
 
  I have tried to set application context variables, but it didn't
  worked, since I m expecting to get these variables as null
  values after node shutdown, but in fact they are coming as not
  null.
 
  If you set them as not null and they are not null why are you
  surprised?
 
  Why do you expect them to be null?
 
 
  p
 
 
  Best Regards,
  Imad Hachem
 
  System Engineer
 
 
 
 
  Date: Tue, 17 Nov 2009 15:38:22 +
  From: p...@pidster.com
  To: users@tomcat.apache.org
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster node
  shutdown, sessionDestroyed been called before contextDestroyed
 
  On 17/11/2009 14:40, Ronald Klop wrote:
  Hi Imad,
 
  Ronald. (The Ronald of the link mentioned by Pid.)
 
  Did the code supplied therein, work for you Ronald?
 
 
  @Imad
 
  The Servlet Spec (and therefore Tomcat) doesn't differentiate
  between
  causes of session expiry.
 
  The code requires you to set a value in the application scope,
  then the
  HttpSessionListener sessionDestroyed method checks for that
  value.
 
  If the value is present, you initiated shutdown. If it is not,
  then
  it's probably a session expiry and you run your logout code.
 
  Did you actually set such an attribute?
 
 
  p
 
 
  Op dinsdag, 17 november 2009 14:36 schreef Imad Hachem
  hachem_i...@hotmail.com:
 
 
 
 
  Dear Pid,
 
 
 
  I am running a Logout Process at each sessionDestroy.
 
 
 
  After applying the Cluster configuration, I don't want to
  Logout my
  Users (or run this Logout Process) after any Tomcat Cluster
  node
  shutdown, since the Session has been replicated to the other
  Node
  Cluster.
 
 
 
 
 
  Best Regards,
  Imad Hachem
  System Engineer
 
 
 
  From: p...@pidster.com
  Date: Tue, 17 Nov 2009 13:09:47 +
  Subject: Re: MISC; Tomcat-5.5.12; After one Tomcat Cluster
  node
  shutdown, sessionDestroyed been called before contextDestroyed
  To: users@tomcat.apache.org
  On 17 Nov 2009, at 12:11, Imad
  Hachemhachem_i...@hotmail.com
  wrote:
 
  Dear Pid,
 
 
 
  I have tried

MISC; Tomcat-5.5.12; After one Tomcat Cluster node shutdown, sessionDestroyed been called before contextDestroyed

2009-11-16 Thread Imad Hachem

Dear all,
 
I am using Tomcat-5.5.12 as Clustering nodes, and after one node shutdown 
sessionDestroyed is called before contextDestroyed.
 
How can I know if sessionDestroyed is called from session.invalidate() from the 
real expiration of the session or shutdown of one cluster node?
 
Note that on sessionDestroyed event, I am using a Logout behavior to logout my 
users from the DATABASE.
 
I have tried to set a KEY on the context (or application scope) to check on it 
during the sessionDestroyed event, but it seems the context is destroyed after 
the session destroy event.
 
Is there any event listener that I can use before the sessionDestroyed to 
differentiate if one cluster node has been shutdown or my session has been 
expired?
 
Or is how to configure the contextDestroy to be called before the sessions 
destroy?
 
Thanks in advance for your help.

Best Regards,
Imad Hachem 

System Engineer 


  
_
Windows Live: Make it easier for your friends to see what you’re up to on 
Facebook.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_2:092009

RE: MISC; After one Tomcat Cluster node shutdown Session Replication working but a Hashmap object is getting empty

2009-11-03 Thread Imad Hachem
Dear Chris / Pid,

Issue has been solved after setting both hashmap  QueryCryptUser
objects to the Session as below:

static HashMap userSessionMapArray = new HashMap();
SecretKey b =  KeyGenerator.getInstance(DESede).generateKey();
QueryCryptUser  qcu = new QueryCryptUser(sessionID, b);
userSessionMapArray.put(sessionID, qcu);

request.getSession().setAttribute(userSessionMapArray,userSessionMapAr
ray;
request.getSession().setAttribute(qcu, qcu);

Thanks for your help



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Imad Hachem 
Sent: Tuesday, November 03, 2009 12:21 PM
To: 'Tomcat Users List'
Subject: RE: MISC; After one Tomcat Cluster node shutdown Session
Replication working but a Hashmap object is getting empty

Dear Chris,

distributable/ has been set in my Web application web.xml and I have
set as well the Context distributable=true in the context.xml of
both Tomcat Nodes but still not able to replicate my haspmap.

Please find below QueryCryptUser.java source code:


package com.guhesan.querycrypt.beans;

import java.util.HashMap;

import javax.crypto.SecretKey;


public class QueryCryptUser implements java.io.Serializable
{
private String sessionID = ;
private HashMap md5Keys = new HashMap();
private SecretKey secretKey = null; 
/**
 * @return Returns the md5Keys.
 */
public HashMap getMd5Keys()
{
return md5Keys;
}
/**
 * @param md5Keys The md5Keys to set.
 */
public void setMd5Keys(HashMap md5Keys)
{
this.md5Keys = md5Keys;
}
/**
 * @return Returns the sessionID.
 */
public String getSessionID()
{
return sessionID;
}
/**
 * @param sessionID The sessionID to set.
 */
public void setSessionID(String sessionID)
{
this.sessionID = sessionID;
}

public void addToMD5Map(String md5, byte[] encryptedStr)
{
this.md5Keys.put(md5, encryptedStr);
}

public byte[] getByKey(String md5key)
{
return (byte[]) this.md5Keys.get(md5key);
}
/**
 * @return Returns the secretKey.
 */
public SecretKey getSecretKey()
{
return secretKey;
}
/**
 * @param secretKey The secretKey to set.
 */
public void setSecretKey(SecretKey secretKey)
{
this.secretKey = secretKey;
}

public QueryCryptUser(String sessionid, SecretKey key)
{
super();
// TODO Auto-generated constructor stub
secretKey = key;
sessionID = sessionid;
}


}


Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, November 02, 2009 10:24 PM
To: Tomcat Users List
Subject: Re: MISC; After one Tomcat Cluster node shutdown Session
Replication working but a Hashmap object is getting empty

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Imad,

On 11/2/2009 12:33 PM, Imad Hachem wrote:
 You are right about the case of Tomcat Node non shutdown, HashMap

RE: MISC; After one Tomcat Cluster node shutdown Session Replication working but a Hashmap object is getting empty

2009-11-02 Thread Imad Hachem
Dear chris,

Thanks for your reply.

You are right about the case of Tomcat Node non shutdown, HashMap is not
replicated correctly to the other node.

Note that I am saving a secretKey (javax.crypto.SecretKey) as a VALUE
for the sessionid KEY stored in the HashMap.

How can I make sure that this secretKey or all HaspMap data are
serializable?

Note I am using the below code to store in the HashMap:

static HashMap userSessionMapArray = new HashMap();
SecretKey   b =
KeyGenerator.getInstance(DESede).generateKey();
QueryCryptUser  qcu = new QueryCryptUser(sessionID, b);
userSessionMapArray.put(sessionID, qcu);


Note that I have tried to create the QueryCryptUser Class to
implements java.io.Serializable but still facing the same problem and
HashMap not replicated to the 2nd Node.




Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, November 02, 2009 5:18 PM
To: Tomcat Users List
Subject: Re: MISC; After one Tomcat Cluster node shutdown Session
Replication working but a Hashmap object is getting empty

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Imad,

On 11/1/2009 1:41 AM, Imad Hachem wrote:
 After setting a Tomcat Cluster of 2 nodes on separate machine, Session
 replication is working very fine except one library objects
 (QueryCrypt.jar included in this Web Project) having a Hashmap where
we
 store Users SESSION ID.
 
 After one node shutdown, this Hashmap object is getting empty, note
that
 all other session variables have been replicated successfully and
 SESSIONID.jvmRoute still the same which is correct and expected
 behavior.

If that node does /not/ shut down, can you observe that the HashMap is
correctly replicated to the other node? I suspect not.

My guess is that your HashMap has data other than just the SESSIONID,
and that data is not serializable.

Can you run this code against your HashMap in the session?

Map map = (Map)session.getAttribute(whatever);

for(Iterator i=map.entrySet().iterator(); i.hasNext(); )
{
  Map.Entry entry = (Map.Entry)i;

  Object key = entry.getKey();
  Object value = entry.getValue();

  System.out.print(key);
  System.out.print( ();
  System.out.print((null == key ? null : key.getClass().getName()));
  System.out.print() - );

  System.out.print(value);
  System.out.print( ();
  System.out.print((null == value
? null
: value.getClass().getName()));
  System.out.println());
}

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkru+DcACgkQ9CaO5/Lv0PAfgACbB7Vu9eKS/9rrfhYxqoBcKnv+
ARQAoKFbk70KLHU/dh+0CypVk839V2ku
=Vz81
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: MISC; After one Tomcat Cluster node shutdown Session Replication working but a Hashmap object is getting empty

2009-11-02 Thread Imad Hachem
Hi Pid,

Thanks for your reply.

I am using a URL Encrytion/Decryption Open Source Library called
QueryCrypt, and HaspMap object has been declared in this Library as
Static.

QueryCrypt Library is based on HashMap where it has been used to store
Users SESSIONIDs and Encryption KEYs.


For each user we are inserting an Entry (Key=SESSIONID,
VALUE=Encryption_key) after an encryption Call of One URL String.

After a Decryption Call, QueryCrypt fetch the HashMap table and retrieve
the Encryption_key for the related SESSIONID.

What is happening, the HasMap table is not replicated at all between
Clustered Tomcats, and after Decryption I am loosing and not able to
Retrieve my Encryption_key in order to Decrypt my URL String.


Are you suggesting to Store the HashMap and QueryCryptUser objects to
the HTTPSession in order to be retrieved later on or just to store them
on the session to force the HashMap to be replicated?




Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, November 02, 2009 8:30 PM
To: users@tomcat.apache.org
Subject: Re: MISC; After one Tomcat Cluster node shutdown Session
Replication working but a Hashmap object is getting empty

On 02/11/2009 17:33, Imad Hachem wrote:
 Dear chris,

 Thanks for your reply.

 You are right about the case of Tomcat Node non shutdown, HashMap is
not
 replicated correctly to the other node.

 Note that I am saving a secretKey (javax.crypto.SecretKey) as a VALUE
 for the sessionid KEY stored in the HashMap.

 How can I make sure that this secretKey or all HaspMap data are
 serializable?

 Note I am using the below code to store in the HashMap:

   static HashMap userSessionMapArray = new HashMap();
   SecretKey   b =
 KeyGenerator.getInstance(DESede).generateKey();
   QueryCryptUser  qcu = new QueryCryptUser(sessionID, b);
   userSessionMapArray.put(sessionID, qcu);

Why is the HashMap static?
I don't think the code above will cause anything to replicate.

 Note that I have tried to create the QueryCryptUser Class to
 implements java.io.Serializable but still facing the same problem and
 HashMap not replicated to the 2nd Node.

Are you storing the QueryCryptUser, or the HashMap in an HTTPSession 
somewhere else?

What is it that you are actually trying to achieve?


p


 Imad Hachem | Asst.Product Development Manager
 e-Banking Department
 Path Solutions
 Tel: +961 1 697444 ext. 222
 Fax: +961 1 696744
 www.path-solutions.com



 Disclaimer
 [The information contained in this e-mail message and any attached
files
 are confidential information and intended solely for the use of the
 individual or entity to whom they are addressed. This transmission may
 contain information that is privileged, confidential or exempt from
 disclosure under applicable law. If you have received this e-mail in
 error, please notify the sender immediately and delete all copies. If
 you are not the intended recipient, any disclosure, copying,
 distribution, or use of the information contained herein is STRICTLY
 PROHIBITED. Path Solutions accepts no responsibility for any errors,
 omissions, computer viruses and other defects.]




 -Original Message-
 From: Christopher Schultz [mailto:ch...@christopherschultz.net]
 Sent: Monday, November 02, 2009 5:18 PM
 To: Tomcat Users List
 Subject: Re: MISC; After one Tomcat Cluster node shutdown Session
 Replication working but a Hashmap object is getting empty

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Imad,

 On 11/1/2009 1:41 AM, Imad Hachem wrote:
 After setting a Tomcat Cluster of 2 nodes on separate machine,
Session
 replication is working very fine except one library objects
 (QueryCrypt.jar included in this Web Project) having a Hashmap where
 we
 store Users SESSION ID.

 After one node shutdown, this Hashmap object is getting empty, note
 that
 all other session variables have been replicated successfully and
 SESSIONID.jvmRoute still the same which is correct and expected
 behavior.

 If that node does /not/ shut down, can you observe that the HashMap is
 correctly replicated to the other node? I suspect not.

 My guess is that your HashMap has data

RE: MISC; After one Tomcat Cluster node shutdown Session Replication working but a Hashmap object is getting empty

2009-11-02 Thread Imad Hachem
Dear Chris,

distributable/ has been set in my Web application web.xml and I have
set as well the Context distributable=true in the context.xml of
both Tomcat Nodes but still not able to replicate my haspmap.

Please find below QueryCryptUser.java source code:


package com.guhesan.querycrypt.beans;

import java.util.HashMap;

import javax.crypto.SecretKey;


public class QueryCryptUser implements java.io.Serializable
{
private String sessionID = ;
private HashMap md5Keys = new HashMap();
private SecretKey secretKey = null; 
/**
 * @return Returns the md5Keys.
 */
public HashMap getMd5Keys()
{
return md5Keys;
}
/**
 * @param md5Keys The md5Keys to set.
 */
public void setMd5Keys(HashMap md5Keys)
{
this.md5Keys = md5Keys;
}
/**
 * @return Returns the sessionID.
 */
public String getSessionID()
{
return sessionID;
}
/**
 * @param sessionID The sessionID to set.
 */
public void setSessionID(String sessionID)
{
this.sessionID = sessionID;
}

public void addToMD5Map(String md5, byte[] encryptedStr)
{
this.md5Keys.put(md5, encryptedStr);
}

public byte[] getByKey(String md5key)
{
return (byte[]) this.md5Keys.get(md5key);
}
/**
 * @return Returns the secretKey.
 */
public SecretKey getSecretKey()
{
return secretKey;
}
/**
 * @param secretKey The secretKey to set.
 */
public void setSecretKey(SecretKey secretKey)
{
this.secretKey = secretKey;
}

public QueryCryptUser(String sessionid, SecretKey key)
{
super();
// TODO Auto-generated constructor stub
secretKey = key;
sessionID = sessionid;
}


}


Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Monday, November 02, 2009 10:24 PM
To: Tomcat Users List
Subject: Re: MISC; After one Tomcat Cluster node shutdown Session
Replication working but a Hashmap object is getting empty

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Imad,

On 11/2/2009 12:33 PM, Imad Hachem wrote:
 You are right about the case of Tomcat Node non shutdown, HashMap is
not
 replicated correctly to the other node.

Okay, good (sort of). If it was only failing on one-node shutdown, it
would be much messier to track this down. Instead, this one attribute
(or perhaps more) are simply failing to replicate properly.

 Note that I am saving a secretKey (javax.crypto.SecretKey) as a VALUE
 for the sessionid KEY stored in the HashMap.

Do you have distributable/ set in your web.xml? If not, you should
enable this. Doing so should cause an IllegalArgumentException to be
thrown if you try to put something into the session that isn't
Serializable.

Note that the above statement only apples to values explicitly stored in
the session. This, for instance, will cause an error:

HttpSession session = request.getSession(true);
session.put(someKey, new NonSerializableClass());

...while this will not:

HttpSession session = request.getSession(true);
HashMap map = new HashMap();
map.put(someOtherKey, new NonSerializableClass());
session.put(someKey, map);

so, you have to be careful that the full object trees you put into your
session are serializable in their entirety. You could write a filter
that checks all this if you wanted to.

 How can I make sure that this secretKey or all HaspMap data are
 serializable?

Well, javax.crypto.SecretKey is not itself required to be serializable,
but one of its implementations, SecretKeySpec, /is/ marked as
Serializable. Any idea what kind of object you actually have?

 Note I am using the below code to store in the HashMap:
 
   static HashMap userSessionMapArray = new HashMap();
   SecretKey

RE: MISC; After one Tomcat Cluster node shutdown Session Replication working but a Hashmap object is getting empty

2009-11-01 Thread Imad Hachem
 

Dear Team,

 

After setting a Tomcat Cluster of 2 nodes on separate machine, Session
replication is working very fine except one library objects
(QueryCrypt.jar included in this Web Project) having a Hashmap where we
store Users SESSION ID.

 

After one node shutdown, this Hashmap object is getting empty, note that
all other session variables have been replicated successfully and
SESSIONID.jvmRoute still the same which is correct and expected
behavior.

 

I have tried to add Context distributable=true in both Tomcat
context.xml files and even tried to add distributable/  to the web.xml
of the Component Project that I am using (QueryCrypt.jar containing a
Startup Servlet) but still facing the same problem and the Hashmap
object used as a table to store Users session ids is getting empty.

 

 

How can I force this Hashmap object to be replicated to the 2nd Tomcat
node since the session still alive and been redirected to the 2nd Tomcat
Cluster node.

 

 

Please help and thanks in advance.

 

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]

 

 

 



MISC; Tomcat-5.5.12 session been invalidated after one Tomcat Cluster node shutdown

2009-10-26 Thread Imad Hachem
Dear Team,

 

Any solution regarding this issue in Tomcat Cluster to avoid Session
invalidate after one Tomcat node shutdown.

 

Note that session invalidate has been called BEFORE the call of the
session destroyed event of each session listener.

 

 

How can this be solved since the session still alive and been redirected
to the 2nd Tomcat Cluster node.

 

And how to differentiate between any Tomcat node Shutdown and Session
invalidate?

 

Please help.

 

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 




Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]

 

 

 



RE: MISC; Tomcat Cluster Sesssion ID changing after one Node Failure

2009-10-24 Thread Imad Hachem
Dear Mikel,

I found the problem in web.xml file containing the distributable/
tag.

Above tag was containing a space causing the SESSION ID to be changed.

Thanks for your help.


Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Imad Hachem 
Sent: Friday, October 23, 2009 9:24 PM
To: 'Tomcat Users List'
Subject: RE: MISC; Tomcat Cluster Sesssion ID changing after one Node
Failure

Dear Mikel,

Session id (session.getId()) is as the below FORMAT if I am connected to
the 1st Tomcat node:

For ex: session.getId() = 0B187109595EBEA79772416BFAE43F77.tomcat1

After stopping/shutdown of the 1st Tomcat Node, then I should get the
same session id but instead of the tomcat1 node the tomcat2 node,
but in fact I am getting a complete session ID as below:

After Shutdown: 
session.getId() =  8a4dbc2db0cb4f86c097705461657097.tomcat2




Please find attached server.xml configuration for more details for the
1st Tomcat node:

Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1

Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership 
 
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver 
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
 
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000/


  
   
Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
/
   
   
   
   
Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
  
 ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/


/Cluster


Any additional configuration to be done?



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Mikel Ibiricu [mailto:jlumi...@gmail.com] 
Sent: Friday, October 23, 2009 3:35 PM
To: Tomcat Users List
Subject: Re: MISC; Tomcat Cluster Sesssion ID changing after one Node
Failure

No, this listener is called even if you don't explicitly call it, except
in
case you use another ClusterListener.

What do you mean with The Session ID is changin? What part of the
jsessionid is changing?

Could you paste your cluster configuration section on your server.xml?



2009/10/23 Imad Hachem ihac...@lb.path-solutions.com

 Dear Mikel,

 Thanks for your Reply.

 Actually I am not using the below tags you have mentioned, but I have
 the below tag:

 ClusterListener

className

RE: MISC; Tomcat Cluster Sesssion ID changing after one Node Failure

2009-10-23 Thread Imad Hachem
Dear Mikel,

Thanks for your Reply.

Actually I am not using the below tags you have mentioned, but I have
the below tag:

ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/

Could be the Problem?

If No, note that at each Node failover, I am getting the below error in
Tomcat Catalina.log:


INFO: Deploying web application archive LoadBalanceTest.war
Oct 21, 2009 5:16:39 PM org.apache.coyote.http11.Http11BaseProtocol
start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 21, 2009 5:16:39 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 21, 2009 5:16:39 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31  config=null
Oct 21, 2009 5:16:39 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Oct 21, 2009 5:16:39 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 12625 ms
Oct 21, 2009 5:17:27 PM org.apache.coyote.http11.Http11BaseProtocol
pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Oct 21, 2009 5:17:28 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 21, 2009 5:17:28 PM
org.apache.catalina.cluster.deploy.FarmWarDeployer stop
INFO: Cluster FarmWarDeployer stopped.
Oct 21, 2009 5:17:28 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter stop
INFO: Stopped ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost
Oct 21, 2009 5:17:28 PM
org.apache.catalina.cluster.tcp.ReplicationListener listen
SEVERE: Unable to process request in ReplicationListener
java.nio.channels.ClosedSelectorException
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at
org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi
stener.java:130)
at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.run(ClusterReceiverB
ase.java:394)
at java.lang.Thread.run(Thread.java:595)
Oct 21, 2009 5:17:28 PM
org.apache.catalina.cluster.tcp.ReplicationListener listen
SEVERE: Unable to process request in ReplicationListener
java.nio.channels.ClosedSelectorException
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
at
org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi
stener.java:130)
at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.run(ClusterReceiverB
ase.java:394)
at java.lang.Thread.run(Thread.java:595)


Can this help?



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Mikel Ibiricu [mailto:jlumi...@gmail.com] 
Sent: Thursday, October 22, 2009 5:33 PM
To: Tomcat Users List
Subject: Re: MISC; Tomcat Cluster Sesssion ID changing after one Node
Failure

Hi

If the issue is that the jvmroute sufix of the JSESSIONID is changing,
maybe
the reason is that you have enabled the JvmRouteBinderValve. (
http://tomcat.apache.org/tomcat-5.5-doc/cluster-howto.html, *Bind
session
after crash to failover node*)

If you've got theese lines inside your cluster configuration, try
deleting
them.

Valve
className=org.apache.catalina.cluster.session.JvmRouteBinderValve
enabled=true sessionIdAttribute=takeoverSessionid/
ClusterListener
className=org.apache.catalina.cluster.session.JvmRouteSessionIDBinderLi
stener
/

Mikel

2009/10/21 Imad Hachem ihac...@lb.path-solutions.com

 Dear Team,



 I am facing an issue in Tomcat 5.5.12  Cluster after one node Failure
or
 shutdown:



 The Session ID is changing, is there any configuration to keep the
same
 session ID?



 Kindly help.







 Imad Hachem | Asst.Product Development Manager

 e-Banking Department

 Path Solutions

 Tel: +961 1 697444 ext. 222

 Fax: +961 1 696744

 www.path-solutions.com http://www.path-solutions.com




 Disclaimer
 [The information contained in this e-mail message and any attached
files
 are confidential information and intended solely for the use of the
 individual or entity to whom they are addressed. This transmission may
 contain information

RE: MISC; Tomcat Cluster Sesssion ID changing after one Node Failure

2009-10-23 Thread Imad Hachem
Dear Mikel,

Session id (session.getId()) is as the below FORMAT if I am connected to
the 1st Tomcat node:

For ex: session.getId() = 0B187109595EBEA79772416BFAE43F77.tomcat1

After stopping/shutdown of the 1st Tomcat Node, then I should get the
same session id but instead of the tomcat1 node the tomcat2 node,
but in fact I am getting a complete session ID as below:

After Shutdown: 
session.getId() =  8a4dbc2db0cb4f86c097705461657097.tomcat2




Please find attached server.xml configuration for more details for the
1st Tomcat node:

Engine name=Catalina defaultHost=localhost jvmRoute=tomcat1

Cluster
className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 
managerClassName=org.apache.catalina.cluster.session.DeltaManager
 expireSessionsOnShutdown=false
 useDirtyFlag=true
 notifyListenersOnReplication=true

Membership 
 
className=org.apache.catalina.cluster.mcast.McastService
mcastAddr=228.0.0.4
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000/

Receiver 
 
className=org.apache.catalina.cluster.tcp.ReplicationListener
tcpListenAddress=auto
tcpListenPort=4001
tcpSelectorTimeout=100
tcpThreadCount=6/

Sender
 
className=org.apache.catalina.cluster.tcp.ReplicationTransmitter
replicationMode=pooled
ackTimeout=15000/


  
   
Valve
className=org.apache.catalina.cluster.tcp.ReplicationValve
 
filter=.*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;
/
   
   
   
   
Deployer
className=org.apache.catalina.cluster.deploy.FarmWarDeployer
  tempDir=/tmp/war-temp/
  deployDir=/tmp/war-deploy/
  watchDir=/tmp/war-listen/
  watchEnabled=false/
  
 ClusterListener
className=org.apache.catalina.cluster.session.ClusterSessionListener/


/Cluster


Any additional configuration to be done?



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Mikel Ibiricu [mailto:jlumi...@gmail.com] 
Sent: Friday, October 23, 2009 3:35 PM
To: Tomcat Users List
Subject: Re: MISC; Tomcat Cluster Sesssion ID changing after one Node
Failure

No, this listener is called even if you don't explicitly call it, except
in
case you use another ClusterListener.

What do you mean with The Session ID is changin? What part of the
jsessionid is changing?

Could you paste your cluster configuration section on your server.xml?



2009/10/23 Imad Hachem ihac...@lb.path-solutions.com

 Dear Mikel,

 Thanks for your Reply.

 Actually I am not using the below tags you have mentioned, but I have
 the below tag:

 ClusterListener

className=org.apache.catalina.cluster.session.ClusterSessionListener/

 Could be the Problem?

 If No, note that at each Node failover, I am getting the below error
in
 Tomcat Catalina.log:


 INFO: Deploying web application archive LoadBalanceTest.war
 Oct 21, 2009 5:16:39 PM org.apache.coyote.http11.Http11BaseProtocol
 start
 INFO: Starting Coyote HTTP/1.1 on http-8080
 Oct 21, 2009 5:16:39 PM org.apache.jk.common.ChannelSocket init
 INFO: JK: ajp13 listening on /0.0.0.0:8009
 Oct 21, 2009 5:16:39 PM org.apache.jk.server.JkMain start
 INFO: Jk running ID=0 time=0/31  config=null
 Oct 21, 2009 5:16:39 PM org.apache.catalina.storeconfig.StoreLoader
load
 INFO: Find registry server-registry.xml at classpath resource
 Oct 21, 2009 5:16:39 PM org.apache.catalina.startup.Catalina start
 INFO: Server startup in 12625 ms
 Oct 21, 2009 5:17:27 PM org.apache.coyote.http11.Http11BaseProtocol
 pause
 INFO: Pausing Coyote HTTP/1.1 on http-8080
 Oct 21, 2009 5:17:28 PM org.apache.catalina.core.StandardService stop
 INFO: Stopping service Catalina
 Oct 21, 2009 5:17:28 PM
 org.apache.catalina.cluster.deploy.FarmWarDeployer stop
 INFO: Cluster FarmWarDeployer stopped.
 Oct 21, 2009 5:17:28 PM

MISC; Tomcat Cluster Sesssion ID changing after one Node Failure

2009-10-21 Thread Imad Hachem
Dear Team,

 

I am facing an issue in Tomcat 5.5.12  Cluster after one node Failure or
shutdown:

 

The Session ID is changing, is there any configuration to keep the same
session ID?

 

Kindly help.

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 




Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]

 

 

 



FW: MISC; Tomcat-5.5.12 Cluster giving Severe Error in ReplicationListener

2009-10-20 Thread Imad Hachem
Dear all,

 

 

I am using Tomcat-5.5.12 installed on Separate machines and configured
as Clustered Session Replication.

 

After stopping one of the Nodes, my Session Replication is not working
very fine between nodes and I am getting the below error:

 

INFO: Pausing Coyote HTTP/1.1 on http-8080

Oct 19, 2009 6:01:24 PM org.apache.catalina.core.StandardService stop

INFO: Stopping service Catalina

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.deploy.FarmWarDeployer stop

INFO: Cluster FarmWarDeployer stopped.

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter stop

INFO: Stopped ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.tcp.ReplicationListener listen

SEVERE: Unable to process request in ReplicationListener

java.nio.channels.ClosedSelectorException

at
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)

at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)

at
org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi
stener.java:130)

at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.run(ClusterReceiverB
ase.java:394)

at java.lang.Thread.run(Thread.java:595)

 

 

 

Did someone faced such Error SEVERE: Unable to process request in
ReplicationListener?

 

And do I need to configure something in my Cluster Tag in server.xml
to avoid such Error?

 

 

Please help.

 

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]

 

 

 



MISC; Tomcat-5.5.12 Cluster giving Severe Error in ReplicationListener

2009-10-19 Thread Imad Hachem
Dear all,

 

 

I am using Tomcat-5.5.12 installed on Separate machines and configured
as Clustered Session Replication.

 

After stopping one of the Nodes, my Session Replication is not working
very fine between nodes and I am getting the below error:

 

INFO: Pausing Coyote HTTP/1.1 on http-8080

Oct 19, 2009 6:01:24 PM org.apache.catalina.core.StandardService stop

INFO: Stopping service Catalina

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.deploy.FarmWarDeployer stop

INFO: Cluster FarmWarDeployer stopped.

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter stop

INFO: Stopped ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost

Oct 19, 2009 6:01:24 PM
org.apache.catalina.cluster.tcp.ReplicationListener listen

SEVERE: Unable to process request in ReplicationListener

java.nio.channels.ClosedSelectorException

at
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)

at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)

at
org.apache.catalina.cluster.tcp.ReplicationListener.listen(ReplicationLi
stener.java:130)

at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.run(ClusterReceiverB
ase.java:394)

at java.lang.Thread.run(Thread.java:595)

 

 

 

Did someone faced such Error SEVERE: Unable to process request in
ReplicationListener?

 

And do I need to configure something in my Cluster Tag in server.xml
to avoid such Error?

 

 

Please help.

 

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 




Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]

 

 

 



RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
Dear Caldarale,

 

I have installed the latest Tomcat version Tomcat-6.0.20 and I am
still getting the same Error.

 

Is there anything to do on the IBM AIX level or at the level of Tomcat
Settings or Startup scripts?

 

Thanks for your help.

 

 

Error faced:

 

SEVERE: Unable to start cluster.

org.apache.catalina.tribes.ChannelException: java.net.SocketException:
The socket name is not available on this system.; No faulty members
identified.

at
org.apache.catalina.tribes.group.ChannelCoordinator.internalStart(Channe
lCoordinator.java:169)

at
org.apache.catalina.tribes.group.ChannelCoordinator.start(ChannelCoordin
ator.java:97)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
.start(MessageDispatchInterceptor.java:147)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.ChannelInterceptorBase.start(ChannelInt
erceptorBase.java:149)

at
org.apache.catalina.tribes.group.GroupChannel.start(GroupChannel.java:40
7)

at
org.apache.catalina.ha.tcp.SimpleTcpCluster.start(SimpleTcpCluster.java:
671)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1035)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at
org.apache.catalina.core.StandardService.start(StandardService.java:516)

at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at
org.apache.catalina.startup.Catalina.start(Catalina.java:583)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

at java.lang.reflect.Method.invoke(Method.java:618)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Caused by: java.net.SocketException: The socket name is not available on
this system.

at java.net.PlainDatagramSocketImpl.join(Native Method)

at
java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:280)

at
java.net.MulticastSocket.joinGroup(MulticastSocket.java:299)

at
org.apache.catalina.tribes.membership.McastServiceImpl.start(McastServic
eImpl.java:233)

at
org.apache.catalina.tribes.membership.McastService.start(McastService.ja
va:373)

at org.apache




Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 14, 2009 7:54 PM
To: Tomcat Users List
Subject: RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml 

 From: Imad Hachem [mailto:ihac...@lb.path-solutions.com]
 Subject: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in
 server.xml
 
 I am getting the below error during Tomcat-5.5.12 Startup on IBM AIX
 5.3 after enabling the Cluster configuration in server.xml :

You might want to try with a version of Tomcat that's a bit newer than
your four-year-old one.

Is multicasting enabled on your platform?  (I have no idea how that's
done on AIX.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
Dear Caldarale,

As per the ifconfig command, it seems BROADCAST and MULTICAST are
enabled on my AIX 5.3 Network interface:

bash-3.00# ifconfig -a
en0:
flags=5e080863,c0UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROU
PRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN
inet 192.168.12.103 netmask 0xfe00 broadcast 192.168.13.255
 tcp_sendspace 131072 tcp_recvspace 65536
en1:
flags=5e080862,c0BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT
,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN
inet 192.168.12.8 netmask 0xfe00 broadcast 192.168.13.255
 tcp_sendspace 131072 tcp_recvspace 65536
et0:
flags=5e080862,80BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT
,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,CHAIN
inet 192.168.12.103 netmask 0xfe00 broadcast 192.168.13.255
lo0:
flags=e08084bUP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64
BIT
inet 127.0.0.1 netmask 0xff00 broadcast 127.255.255.255
inet6 ::1/0
 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1


Is there another place to check if MULTICAST is enabled or to be
configured somewhere ?



Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 
-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Wednesday, October 14, 2009 7:54 PM
To: Tomcat Users List
Subject: RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml 

 From: Imad Hachem [mailto:ihac...@lb.path-solutions.com]
 Subject: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in
 server.xml
 
 I am getting the below error during Tomcat-5.5.12 Startup on IBM AIX
 5.3 after enabling the Cluster configuration in server.xml :

You might want to try with a version of Tomcat that's a bit newer than
your four-year-old one.

Is multicasting enabled on your platform?  (I have no idea how that's
done on AIX.)

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-15 Thread Imad Hachem
I solved the issue Christopher,

It was a configuration on IBM AIX to bind the multicast address
(228.0.0.4) to the IP of network interface using smitty Admin Console.

Thanks for your reply.





Imad Hachem | Asst.Product Development Manager
e-Banking Department
Path Solutions
Tel: +961 1 697444 ext. 222
Fax: +961 1 696744
www.path-solutions.com



Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]
 
 
 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net] 
Sent: Thursday, October 15, 2009 7:20 PM
To: Tomcat Users List
Subject: Re: Tomcat Startup Error on IBM AIX 5.3 after Cluster enable
in server.xml

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Imad,

On 10/15/2009 12:03 PM, Imad Hachem wrote:
 As per the ifconfig command, it seems BROADCAST and MULTICAST are
 enabled on my AIX 5.3 Network interface:

Yes, it appears that all of your interfaces have MULTICAST enabled.

 Is there another place to check if MULTICAST is enabled or to be
 configured somewhere ?

You'd have to ask an AIX admin about that; I have no such experience.

You should post your cluster configuration, too. Have you permanently
moved-up to Tomcat 6.0.20, or are you still trying to get Tomcat 5.5.12
working?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrXS7UACgkQ9CaO5/Lv0PALMgCfaTq4sZjwosF3KorZR2T68npQ
f+4AoKpKSspH90rn96mGj9IVipHSatAc
=KaCy
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Tomcat Startup Error on IBM AIX 5.3 after Cluster enable in server.xml

2009-10-14 Thread Imad Hachem
Dear all,

 

I am getting the below error during Tomcat-5.5.12 Startup on IBM AIX
5.3 after enabling the Cluster configuration in server.xml :

 

Oct 14, 2009 2:31:58 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
start

INFO: Cluster is about to start

Oct 14, 2009 2:31:58 PM
org.apache.catalina.cluster.tcp.ReplicationTransmitter start

INFO: Start ClusterSender at cluster
Catalina:type=Cluster,host=localhost with name
Catalina:type=ClusterSender,host=localhost

Oct 14, 2009 2:31:59 PM org.apache.catalina.cluster.tcp.SimpleTcpCluster
start

SEVERE: Unable to start cluster.

java.net.SocketException: The socket name is not available on this
system.

at java.net.PlainDatagramSocketImpl.join(Native Method)

at
java.net.PlainDatagramSocketImpl.join(PlainDatagramSocketImpl.java:280)

at
java.net.MulticastSocket.joinGroup(MulticastSocket.java:299)

at
org.apache.catalina.cluster.mcast.McastServiceImpl.start(McastServiceImp
l.java:174)

at
org.apache.catalina.cluster.mcast.McastService.start(McastService.java:3
13)

at
org.apache.catalina.cluster.mcast.McastService.start(McastService.java:2
60)

at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.
java:765)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1002)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

at
org.apache.catalina.core.StandardService.start(StandardService.java:450)

at
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)

at
org.apache.catalina.startup.Catalina.start(Catalina.java:536)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:79)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:43)

at java.lang.reflect.Method.invoke(Method.java:618)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

Oct 14, 2009 2:31:59 PM org.apache.catalina.startup.Catalina start

SEVERE: Catalina.start: 

LifecycleException:  java.net.SocketException: The socket name is not
available on this system.

at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.start(SimpleTcpCluster.
java:781)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1002)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718) 

 

 

 

 

Any help please.

 

 

 

Imad Hachem | Asst.Product Development Manager

e-Banking Department

Path Solutions

Tel: +961 1 697444 ext. 222

Fax: +961 1 696744

www.path-solutions.com http://www.path-solutions.com 




Disclaimer
[The information contained in this e-mail message and any attached files
are confidential information and intended solely for the use of the
individual or entity to whom they are addressed. This transmission may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you have received this e-mail in
error, please notify the sender immediately and delete all copies. If
you are not the intended recipient, any disclosure, copying,
distribution, or use of the information contained herein is STRICTLY
PROHIBITED. Path Solutions accepts no responsibility for any errors,
omissions, computer viruses and other defects.]