Hi,
Is there a way to stop the 'AbstractPollingEndpoint' without having it cancelling the current running task. We are trying to implement a shutdown procedure for our system and don't want it to cancel what is running, just not accept new task.
What we do right now is call the 'stop()' method on our inbound channel adapters and some endpoint (we leave some messages in the queues). However we often get MessageDeliveryExceptions on the endpoints we call stop. Looking at the code I found this AbstractPollingEndpoint:
Code:
protected void doStop() {
if (this.runningTask != null) {
this.runningTask.cancel(true);
this.runningTask = null;
this.initialized = false;
}
My problem is if I want to override this and let it finish the runningTask I can't because it's a private field. Do you guys know of any way I could achieve this.
Thanks,
Mat