You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by William Norris <wn...@gmail.com> on 2005/03/07 17:04:08 UTC

tomcat caching servlet conf directory?

I am working on writing some junit tests for a project and am running
into some rather odd behavior... it seems that tomcat is caching the
servlets configuration data somewhere between tests.  Here's what I'm
doing...

Presently I have one TestCase class with two methods, let's call them
testA() and testB().  Each method first copies a config directory into
place inside the servlet's webapps folder.  It then creates a new
Embedded object, configures it with a custom connector I created, and
starts up Tomcat.  I then pass in a fabricated HTTP request and check
the result against the expected response.

These two particular tests happen to use the same servlet
configuration, so to verify that things are acting weird, I changed
testA() to copy in a non-working configuration.  If I run testA()
first, then it fails as expected.  However, if I run testB() first and
then testA() then both tests pass, verifying that testA is in fact
using the leftover configuration from testB.  I've additionally
printed out the contents of the servlet's configuration directory
AFTER copying the contents over, but BEFORE starting up tomcat to
ensure the new configuration data is actually being copied over...
which it is.  Finally, I tried deleting the entire work/ directory
between tests to ensure nothing was being cached in there.

At this point, I'm somewhat at a loss.  There appear to be no caches
on the filesystem, and because I'm starting with a new Embedded object
for each method, there shouldn't be any caches in memory.  Any help
would be greatly appreciated.

--
Will Norris
Shibboleth Project
The University of Memphis

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Remote debugging with tomcat windows

Posted by Randy Paries <ra...@unitnet.com>.
Hello I am running tomcat 5 on windoze xp and trying to get remote debugging
to work. I can do it fine when the server is linux but can not get it to
work with windoze.

In the java options (in the tomcat properties dialog) I put the following

-Xdebug -Xnoagent -Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

In my log file I get ::: (even if all I add is -Xdebug)

Thanks for any help

[2005-03-07 15:54:16] [415  javajni.c] [error] CreateJavaVM Failed
[2005-03-07 15:54:16] [770  prunsrv.c] [error] Failed initializing java
C:\Program Files\Apache Software Foundation\Tomcat 5.0\bin\bootstrap.jar
[2005-03-07 15:54:16] [982  prunsrv.c] [error] ServiceStart returned 2




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: tomcat caching servlet conf directory?

Posted by Will Norris <wn...@gmail.com>.
okay... so disregard this.  It turns out the servlet was parsing the
configuration document into a static variable that was not being reset
between tests.  All is well with the world again.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org