Hi,
  This should be strait forward if you use terracotta. If you have a
NFS that all Tomcat instances share, using FileChannel::lock is way
cheaper than any other solution.

-lg

On Sun, Jan 11, 2009 at 2:30 AM, Rusty Wright <rusty.wri...@gmail.com> 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
> (yyyy-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

Reply via email to