I have a JavaEE application deployed to Weblogic 10.3. In my application, I created a Timer
and TimerTask
that started at the beginning of the application loading up by doing the following:
TimerTask t = new TimerTask() {
@Override
public void run() {
// Perform task
}
};
Timer timer = new Timer();
timer.scheduleAtFixedRate(t, 0, 15000);
The problem is, after redeploying the application, the previous timer tasks are still executing. So after 5 deployments, there are 5 timers executing. I don't have the ability to restart the Weblogic server, and I've searched around for a solution but to no avail. Is there any way to stop these tasks?
I no longer need to use the TimerTask
, I would just like to stop the ones that are still currently executing.