Re: Tomcat ./shutdown

2009-01-07 Thread Dennis Thrysøe

On 7Jan, 2009, at 16:11, l...@informatik.uni-hamburg.de wrote:

Hello,

I use apache-tomcat-5.5.17 and sometimes when I call ./shutdown.sh,  
the java process which runs Tomcat still alive.


Because this java process is still alive, the next call ./startup.sh  
does not work. Thus, I have to kill this Java process first.


Could you please give me a hint how I avoid this problem?



I'm actually having trouble with this as well. It does look, however,  
like the tomcat process dies after a while in my case. But using  
"restart" (stop immediately followed by start) does not work though.


Is it possible to stop tomcat "synchronously" such that the "stop"  
invocation does not return before tomcat is entirely show down?


-dennis

--
Geysir IT
d...@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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



Re: Delay / caching of resources?

2009-01-07 Thread Dennis Thrysøe

On 7Jan, 2009, at 15:44, Caldarale, Charles R wrote:

From: Dennis Thrysøe [mailto:d...@geysirit.dk]
Subject: Re: Delay / caching of resources?

I have now found a potential explanation with the help of a good
debugger: StandardContext.setCacheTTL()


Who's calling that API?  The only internal calls I find in Tomcat  
simply propagate the value from one context to another.


That's what I was wondering. Some kind of reflective setting from the  
XML file I guess?



I am, however, unable to find any configuration that can be used to
control this caching?


Look at the cacheTTL and cachingAllowed attributes:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html



Thanks guys. I bet that'll help. I'll try it out right away.

-dennis

--
Geysir IT
d...@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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



Re: Delay / caching of resources?

2009-01-07 Thread Dennis Thrysøe

On 7Jan, 2009, at 10:40, Dennis Thrysøe wrote:

Hi,

I have a tomcat 6 setup on linux (CentOS 5) and see some odd  
behaviour.


There are some JSP's that include (in a custom tag with  
pageContext.include()) static HTML resources that are in the webapp.


However, when such HTML files are added or modified to the webapp  
(exploded directory) it takes something like 5 or 10 seconds before  
they can be served by tomcat.


Direct access to the filesystem sees the new file but tomcat says  
that the resource cannot be found. When modifying a HTML file tomcat  
keeps serving the old version for some seconds.


The same seems to be a problem for images which are added to the  
webapp at runtime. These are requested directly (not included  
obviously).


Changing the "modificationTestInterval" for the JSP servlet does not  
seem to have effect. (And the HTML is not served by the JSP servlet  
anyway, right?)



I have now found a potential explanation with the help of a good  
debugger: StandardContext.setCacheTTL()


This method seems to be altering the TTL of the context cache  
(ProxyDirContext via BaseDirContext) that is used by DefaultServlet  
which is serving my HTML files )from the default 5 seconds).


I am, however, unable to find any configuration that can be used to  
control this caching? I am interested in getting the latest file  
version always.


Otherwise I might need to implement serving of static resources in a  
servlet myself?



Thanks,

-dennis

--
Geysir IT
d...@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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



Re: Delay / caching of resources?

2009-01-07 Thread Dennis Thrysøe

On 7Jan, 2009, at 10:45, Peter Crowther wrote:

From: Dennis Thrysøe [mailto:d...@geysirit.dk]
However, when such HTML files are added or modified to the webapp
(exploded directory) it takes something like 5 or 10 seconds before
they can be served by tomcat.


A wild stab in the dark based on something that happened to me...

How are you adding the files to the webapp?  In particular, are you  
referencing the folder via a network file system, and if so is there  
any clock skew between the server and the machine from which you're  
adding the files?  This can cause odd timestamps on the new files,  
which may in turn lead to some applications not using them correctly  
if the timestamps are "in the future" as far as the server's  
concerned.


No, the webapp is local and the modifications (new files and/or  
altered content) actually come from a servlet in the same tomcat  
context.


If you're adding the files on the same machine, this doesn't apply  
and I'll crawl back under my rock ;-).


Thanks anyway :)


-dennis

--
Geysir IT
d...@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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



Delay / caching of resources?

2009-01-07 Thread Dennis Thrysøe

Hi,

I have a tomcat 6 setup on linux (CentOS 5) and see some odd behaviour.

There are some JSP's that include (in a custom tag with  
pageContext.include()) static HTML resources that are in the webapp.


However, when such HTML files are added or modified to the webapp  
(exploded directory) it takes something like 5 or 10 seconds before  
they can be served by tomcat.


Direct access to the filesystem sees the new file but tomcat says that  
the resource cannot be found. When modifying a HTML file tomcat keeps  
serving the old version for some seconds.


The same seems to be a problem for images which are added to the  
webapp at runtime. These are requested directly (not included  
obviously).


Changing the "modificationTestInterval" for the JSP servlet does not  
seem to have effect. (And the HTML is not served by the JSP servlet  
anyway, right?)


Any good suggesions to what's going on? Are there any obious features  
or problems in tomcat that could cause this?


Any good suggestions for how to debug the problem further?


Thanks,

-dennis


--
Geysir IT
d...@geysirit.dk
http://geysirit.dk
+45 31 51 60 00


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



Re: Automatic restart?

2007-11-26 Thread Dennis Thrysøe


On 26Nov, 2007, at 21:30, Mark Thomas wrote:


Dennis Thrysøe wrote:

Is there some mechanism that restarts when all threads are stuck, or
after some timeout? Is this configurable.


In short, there is no such mechanism. Is some other software  
monitoring

Tomcat and restarting it if it fails?


No. But I see the pause and stop messages from tomcat and some  
"closing down" stuff from my own Filter.destroy(). However this  
destroy method throws an exception (my fault) which leaves things in a  
bad state.


It seems that the "guts" of the webapp have been closed down, but  
requests are still being served.


Tomcat 5.5.17 by the way.

This isn't really a super-important problem, since the root-cause  
needs to be fixed under any circumstances. I'm just curious on how the  
webapp/servlet container can enter such a state.


What about when tomcat closes down. Will it eventually (after a  
timeout) call Filter.destroy() even if there are still threads  
executing within it?


-dennis
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Automatic restart?

2007-11-26 Thread Dennis Thrysøe

Hello,

I'm getting logFull "all threads in use" messages now and then, and  
have a pretty good idea why.


But it seems that tomcat decides to shut down / restart the webapp (or  
more than that) just after this.


Is there some mechanism that restarts when all threads are stuck, or  
after some timeout? Is this configurable.


I'd like some insight into what's going on excactly.

Thanks,

-dennis

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedding jasper (tomcat 5.5)

2007-06-06 Thread Dennis Thrysøe

Bill Barker wrote:
"Dennis Thrysøe" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Any ideas what tomcat is doing to seperate for instance it's own 
commons-logging with a commons-logging in a deployed webapp?




Probably, the easiest is to jump to TC 6.  That version no longer uses 
commons-logging.


But then I suppose other libraries could cause the same confusion?

Unfortunately or customers require java 1.4 for now, so I guess Tomcat 6 
is out of the question.


I'm still really interested in good ideas on how to implement this. I'm 
guessing that it works in Tomcat, but it's hard to read from the code 
for an outsider.


I was hoping for some hidden trick of specifying explicit classloaders 
for various situations (I want to load jasper-related stuff with one 
classloader and application related stuff with another...).


-dennis
---
The information in this email is confidential and may be legally protected.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Embedding jasper (tomcat 5.5)

2007-06-06 Thread Dennis Thrysøe

Hi,

I'm attempting to embed jasper into an application of mine. Actually I'm 
upgrading it from 4.1 to 5.5.


The new version of jasper uses commons-logging, which the old one didn't 
seem to do. This causes problems for me when using jasper in 
webapplications that contain their own copy of commons-logging in 
WEB-INF/lib.


The LogFactory complains that more than one Log class is visible.

I am loading the JspServlet class with an "outside" classloader, but I 
am encountering exeptions when asking this JspServlet to service 
requests with the ContextClassLoader ser to a specific webapp-classloader.


Any ideas what tomcat is doing to seperate for instance it's own 
commons-logging with a commons-logging in a deployed webapp?



Thanks,

-dennis

---
The information in this email is confidential and may be legally protected.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]