Re: single instance of background job?
What I did was a little bit of extra work on top of quartz. I have a table that stores the configuration for all of my quartz jobs. When a quartz job kicks off, it will first try to update its last execute time in the table. If the last execute time is too new the update will fail and the process will exit. I use spring-javaconfig to build my quartz configuration from this table procedurally on application startup and I provide a web and Ice API for administrators to make changes. -Matt Rusty Wright wrote: This isn't really a Tomcat question I'm guessing but I don't know where else to ask. In our setup we have multiple Tomcats behind a load balancer. I have a background task that will run once a day, via Quartz. All Tomcats will be using the same war so they will all run the job, but I need it so only one of them runs the job. I'm looking for ideas for how to implement this. At the moment all I can think of is to use a table in a database with a unique constraint on a column, and each background process tries to insert today's date (-mm-dd) and the one that succeeds runs the job, and the ones that don't, do nothing. Thanks - 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 6 JNI Re-Loading Problem
Hey all, I'm loading a couple classes that use native code libraries. Everything loads great the first time, but during hot deployment, tomcat complains the .so is already loaded. Is there a way to make sure the libraries get unloaded? In one of my classes I have the standard: static { System.loadLibrary(name); } I'm using Tomcat 6.0.14. -Matt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat crash
Hi everyone, I'm new to the list. I just updated a tomcat server from 5.0 to 5.5.20 and I'm having a little problem. I'm using the same JVM, 1.5.08. I've read a bunch of solutions, none of them seem to work for me. I had two crashes, a couple hours apart from the other, generally these machines run high load 24/7 for months at a time with no problems. First one was in: Current thread (0x0806cc18): GCTaskThread [id=32102] Second one: Current thread (0x4030dff0): JavaThread http-9120-Processor15 daemon [_thread_in_Java, id=713] In both cases, there was a large spike in the number of threads running right before the cash, but no corresponding increase in cpu, memory or bandwidth usage. I did make a couple other changes between versions: * added latest log4j * dropped minspare threads from 25 to 15, and maxspare from 50 to 30, max is set to 250. This is my options line: JAVA_OPTS=-server -Xms500m -Xmx1600m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+UseConcMarkSweepGC -XX:PermSize=128m -XX:MaxPermSize=256 If you would like to see the whole hs_err log let me know and I will post it. I also found that in both cases it looks like an RMI request is being accepted: 0x3f7f9598 JavaThread RMI TCP Accept-0 daemon [_thread_in_native, id=692] 0x3e4f69d0 JavaThread RMI TCP Accept-9125 daemon [_thread_in_native, id=691] Matt - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]