RE: Deployment over a running webapp does not call session detroyed?

2011-12-13 Thread Caldarale, Charles R
> From: Gabriele Bulfon [mailto:gbul...@sonicle.com] 
> Subject: RE: Deployment over a running webapp does not call session detroyed?

> what is the point to mantain http sessions valid when all the 
> other stuff have been destroyed and reloaded?

Sounds like your webapp doesn't reinitialize itself properly, but is simply 
assuming the existence of objects based on session existence - an invalid 
assumption.  Again, you should be using context listeners for that, not session 
ones.

> If there is any design I should follow to recreate my new object
> structure on the mantained sessions, I would try to do it.

Yes - a ServletContextListener (or perhaps a HttpSessionActivationListener).  
If you simply want to prevent session persistence, configure your  to 
not do so:

http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html#Persistence_Across_Restarts

 - 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



RE: Deployment over a running webapp does not call session detroyed?

2011-12-13 Thread Gabriele Bulfon
I was really hoping that the bug was mine, but...in my case, mantaining 
sessions during deployment
is totally useless, because my server classes instances have changed, probably 
destroyed by Tomcat,
and most of them are obviously per session instances. Also, Tomcat seems to 
destroy jndi data sources
during deployment, thus invalidating any previously taken data source.
As my webapp is secured through JAAS, I also notice that reloading the webapp 
after deployment,
brings me back to the configured login page, as if the security context is no 
more valid.
So, my question is, what is the point to mantain http sessions valid when all 
the other stuff have
been destroyed and reloaded?
If there is any design I should follow to recreate my new object structure on 
the mantained sessions,
I would try to do it.
Thanx a lot!
Gabriele.
--
Da: Caldarale, Charles R
A: Tomcat Users List
Data: 12 dicembre 2011 19.02.26 CET
Oggetto: RE: Deployment over a running webapp does not call session detroyed?
From: Gabriele Bulfon [mailto:gbul...@sonicle.com]
Subject: Deployment over a running webapp does not call session detroyed?
the ContextListener contextDestroyed is called, but I have no way to
access my threads and kill them from there
Is this a bug or am I missing something?
Yes, it's a bug - yours.  By design, sessions are maintained across a webapp 
redeployment.  You'll need to make your code smarter about tracking auxiliary 
threads that you start and that Tomcat is completely unaware of.  For example, 
you could save the threads in some sort of list or array accessible to your 
context listener, and have it take care of shutting down your threads.
- 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: Deployment over a running webapp does not call session detroyed?

2011-12-12 Thread Caldarale, Charles R
> From: Gabriele Bulfon [mailto:gbul...@sonicle.com] 
> Subject: Deployment over a running webapp does not call session detroyed?

> the ContextListener contextDestroyed is called, but I have no way to
> access my threads and kill them from there

> Is this a bug or am I missing something?

Yes, it's a bug - yours.  By design, sessions are maintained across a webapp 
redeployment.  You'll need to make your code smarter about tracking auxiliary 
threads that you start and that Tomcat is completely unaware of.  For example, 
you could save the threads in some sort of list or array accessible to your 
context listener, and have it take care of shutting down your threads.

 - 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