mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
use SimpleClassLoaderLifeCycle by default
This commit is contained in:
@@ -19,17 +19,17 @@ public abstract class ClassLoaderLifeCycle implements LifeCycle {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ClassLoaderLifeCycle.class);
|
||||
|
||||
@VisibleForTesting
|
||||
static final String PROPERTY = "sonia.scm.classloading.lifecycle";
|
||||
static final String PROPERTY = "sonia.scm.lifecycle.classloading";
|
||||
|
||||
public static ClassLoaderLifeCycle create() {
|
||||
ClassLoader webappClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
String implementation = System.getProperty(PROPERTY);
|
||||
if (SimpleClassLoaderLifeCycle.NAME.equalsIgnoreCase(implementation)) {
|
||||
LOG.info("create new simple ClassLoaderLifeCycle");
|
||||
return new SimpleClassLoaderLifeCycle(webappClassLoader);
|
||||
if (ClassLoaderLifeCycleWithLeakPrevention.NAME.equalsIgnoreCase(implementation)) {
|
||||
LOG.info("create new ClassLoaderLifeCycle with leak prevention");
|
||||
return new ClassLoaderLifeCycleWithLeakPrevention(webappClassLoader);
|
||||
}
|
||||
LOG.info("create new ClassLoaderLifeCycle with leak prevention");
|
||||
return new ClassLoaderLifeCycleWithLeakPrevention(webappClassLoader);
|
||||
LOG.info("create new simple ClassLoaderLifeCycle");
|
||||
return new SimpleClassLoaderLifeCycle(webappClassLoader);
|
||||
}
|
||||
|
||||
private final ClassLoader webappClassLoader;
|
||||
|
||||
Reference in New Issue
Block a user