Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Tomcat 4, Suse 9.1, Intel Xeon 64bit processors threading problems.

Thread view: 
scotty7676@comcast.net - 05 Jan 2006 16:59 GMT
Hey all, had a quick question about the setup in the Subject and
threading in Java.  I have a servlet that runs it's own thread using
TimerTask running in tomcat.  The problem is, when I go into the tomcat
manager and restart the specific context, the existing thread continues
to run, but then starts a new one also.  I know it is still running
because this thread sends me an email once a day.  So if I restart the
instance 3 times, I get 3 emails at once.  Now get this....it will not
end the threads even when restarting the tomcat server.  I actually
have to reboot the server to shut off these runaway threads.

Second issue I have is when I change the web.xml file within my context
(i.e. to add a new servlet definition), and restart the context, it
will not pick up the new web.xml unless I restart tomcat.

Neither one of these issues occur on a 32-bit Xeon Linux server running
an exact copy of tomcat.

Any ideas or has anyone else experience problems like this?

Thanks!
Scott
Chris Smith - 05 Jan 2006 17:09 GMT
> Hey all, had a quick question about the setup in the Subject and
> threading in Java.  I have a servlet that runs it's own thread using
[quoted text clipped - 5 lines]
> end the threads even when restarting the tomcat server.  I actually
> have to reboot the server to shut off these runaway threads.

Sounds like you need a ServletContextListener that cancels that task
when the web application is undeployed.

> Second issue I have is when I change the web.xml file within my context
> (i.e. to add a new servlet definition), and restart the context, it
> will not pick up the new web.xml unless I restart tomcat.

Really?  I have no explanation for this one.  It should work.  Maybe you
should provide more information (Tomcat version, confuguration files,
what steps you take to redeploy).

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Aray - 06 Jan 2006 05:41 GMT
"Chris Smith" <cdsmith@twu.net>
??????:MPG.1e2700b5437d29a8989cda@news.altopia.net...
>> Hey all, had a quick question about the setup in the Subject and
>> threading in Java.  I have a servlet that runs it's own thread using
[quoted text clipped - 16 lines]
> should provide more information (Tomcat version, confuguration files,
> what steps you take to redeploy).

to allow tomat reload context after files changed, you must add
"reloadable=true" property to context setting, below is an example

<Context path="/eba" docBase="F:\Aray\workspace\bonceba\bonceba" debug="0"
privileged="true" reloadable="true">
</Context>

if you do not specify property reloadable, the default value is false

automatic reload will make you happy while you are developing, you needn't
to restart tomcat to make you changes become effective. but it take some
system resource, and may cause tomcat crash while lots of changes made in a
short period. So you'd like to set reloadable=false in a publish server
Chris Smith - 06 Jan 2006 06:01 GMT
> > Really?  I have no explanation for this one.  It should work.  Maybe you
> > should provide more information (Tomcat version, confuguration files,
[quoted text clipped - 8 lines]
>
> if you do not specify property reloadable, the default value is false

All of that is true, but it is irrelevant to Scott.  He said, and I
quote: "I change the web.xml file within my context ... and restart the
context"  It shouldn't matter what "reloadable" is set to if Scott is
using the Tomcat manager webapp to restart the context.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

scotty7676@comcast.net - 06 Jan 2006 21:38 GMT
That is a good idea about the ServletContextListener to cancel the
thread when the context stops.  I will try that and see what happens.

I am using JDK 1.4.2 to run tomcat on the machine.  I downloaded and
installed this using the list from SUSE's Yast.

Thanks for the ideas, I will try some of this out Monday and see what
happens.
Markus Neviadomski - 05 Jan 2006 19:55 GMT
Am Thu, 05 Jan 2006 08:59:52 -0800 schrieb scotty7676:

> Hey all, had a quick question about the setup in the Subject and
> threading in Java.  I have a servlet that runs it's own thread using
[quoted text clipped - 12 lines]
> Neither one of these issues occur on a 32-bit Xeon Linux server running
> an exact copy of tomcat.

Humm...what version of JRE are you running on the 64bit machine? Try to
get the latest one directly from sun. I had a number of issues with
different early releases of the vm.

Markus

Signature

Markus Neviadomski             mailto: mn@dieitexperten.de
Linux User #291181             WWW:    www.dieitexperten.de
GPG-Key: 0xF5226EB5



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.