Skip to content

Commit 2c3b517

Browse files
committed
wip
1 parent a241ccd commit 2c3b517

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

src/main/java/nl/knaw/dans/lib/util/pollingtaskexec/ExecutorServiceTaskScheduler.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,20 @@
1515
*/
1616
package nl.knaw.dans.lib.util.pollingtaskexec;
1717

18-
import io.dropwizard.hibernate.UnitOfWorkAwareProxyFactory;
1918
import lombok.RequiredArgsConstructor;
2019

2120
import java.util.concurrent.ExecutorService;
2221

2322
/**
2423
* A task scheduler implementation that schedules tasks for execution using an {@link ExecutorService}. This class allows for tasks to be executed asynchronously using the provided executor service.
25-
* If a {@link UnitOfWorkAwareProxyFactory} is provided, it will create a proxy for the task to ensure that it is executed within a unit of work context, which is useful for tasks that interact with a
26-
* database using Hibernate. If no proxy factory is provided, tasks will be executed directly without any additional context management.
2724
*
2825
*/
2926
@RequiredArgsConstructor
3027
public class ExecutorServiceTaskScheduler implements TaskScheduler {
3128
private final ExecutorService executorService;
32-
private final UnitOfWorkAwareProxyFactory unitOfWorkAwareProxyFactory;
33-
34-
public ExecutorServiceTaskScheduler(ExecutorService executorService) {
35-
this(executorService, null);
36-
}
3729

3830
@Override
3931
public void schedule(Runnable task) {
40-
if (unitOfWorkAwareProxyFactory != null) {
41-
task = unitOfWorkAwareProxyFactory.create(Runnable.class, new Class[] { Runnable.class }, new Object[] { task });
42-
}
4332
executorService.submit(task);
4433
}
4534
}

0 commit comments

Comments
 (0)