INT-3628: Use SchedulingAwareRunner for Long Tasks
JIRA: https://jira.spring.io/browse/INT-3628 Certain tasks in Spring Integration are long running. Indicate so for the benefit of platforms such as WebLogic that can log warnings for long running tasks otherwise. Also fix conflicting versions of commons-io.
This commit is contained in:
committed by
Artem Bilan
parent
beeb49d55b
commit
80a45715ac
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2013 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,6 +21,7 @@ import java.io.InputStreamReader;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.scheduling.SchedulingAwareRunnable;
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -35,7 +36,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
*/
|
||||
public class OSDelegatingFileTailingMessageProducer extends FileTailingMessageProducerSupport
|
||||
implements Runnable {
|
||||
implements SchedulingAwareRunnable {
|
||||
|
||||
private volatile Process process;
|
||||
|
||||
@@ -61,6 +62,11 @@ public class OSDelegatingFileTailingMessageProducer extends FileTailingMessagePr
|
||||
return super.getComponentType() + " (native)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLongLived() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInit() {
|
||||
Assert.notNull(getFile(), "File cannot be null");
|
||||
|
||||
Reference in New Issue
Block a user