diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java index 316c085f4..38b194aba 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/DataCacheScheduler.java @@ -99,10 +99,9 @@ public class DataCacheScheduler _caches.put(cache, schedule); _stop = false; if (_thread == null) { - _thread = (Thread) AccessController - .doPrivileged(J2DoPrivHelper.newThreadAction(this, _loc.get( - "scheduler-name").getMessage())); - _thread.setDaemon(true); + _thread = (Thread) AccessController.doPrivileged(J2DoPrivHelper + .newDaemonThreadAction(this, _loc.get("scheduler-name") + .getMessage())); _thread.start(); if (_log.isTraceEnabled()) _log.trace(_loc.get("scheduler-start", _thread.getName())); diff --git a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java index f3269e11c..391178578 100644 --- a/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java +++ b/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java @@ -24,6 +24,7 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.lang.reflect.AccessibleObject; +import java.lang.reflect.AnnotatedElement; import java.net.InetAddress; import java.net.MalformedURLException; import java.net.ServerSocket; @@ -48,6 +49,9 @@ import serp.bytecode.Project; * methods: *