SystemTimerPool.java revision be34d3a7cf588cb751d61e9acc86f1ff328e0344
754cb8a2b33fa6cfaa15d6470f66e5fb0eab4764Automatic Updater * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * The contents of this file are subject to the terms
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * of the Common Development and Distribution License
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * (the License). You may not use this file except in
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * compliance with the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * You can obtain a copy of the License at
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * https://opensso.dev.java.net/public/CDDLv1.0.html or
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * See the License for the specific language governing
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * permission and limitations under the License.
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * When distributing Covered Code, include this CDDL
08f860f800d32007a0c9bf456f6c35fbb2ecbc81Evan Hunt * Header Notice in each file and include the License file
68c2ccc953059f389cefc0f8a5ce0f83be7458c9Danny Mayer * If applicable, add the following below the CDDL Header,
68c2ccc953059f389cefc0f8a5ce0f83be7458c9Danny Mayer * with the fields enclosed by brackets [] replaced by
68c2ccc953059f389cefc0f8a5ce0f83be7458c9Danny Mayer * your own identifying information:
68c2ccc953059f389cefc0f8a5ce0f83be7458c9Danny Mayer * "Portions Copyrighted [year] [name of copyright owner]"
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * $Id: SystemTimerPool.java,v 1.5 2008/09/05 00:51:02 ww203982 Exp $
922a15c7c07b876c7ca1dbfa871da86ddaae8d4dDanny Mayer * Portions Copyrighted 2012-2015 ForgeRock AS.
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayerimport com.sun.identity.shared.configuration.SystemPropertiesManager;
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayerimport org.forgerock.util.thread.listener.ShutdownListener;
61e561c2ca53252614fbe0ba35e465c9c7afb19aDanny Mayer * SystemTimerPool is a TimerPool which shared in the system.
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer private static int poolSize;
922a15c7c07b876c7ca1dbfa871da86ddaae8d4dDanny Mayer // Don't load the Debug object in static block as it can
61e561c2ca53252614fbe0ba35e465c9c7afb19aDanny Mayer // cause issues when doing a container restart.
922a15c7c07b876c7ca1dbfa871da86ddaae8d4dDanny Mayer Debug debug = Debug.getInstance("SystemTimerPool");
61e561c2ca53252614fbe0ba35e465c9c7afb19aDanny Mayer debug.error("SystemTimerPool.<init>: incorrect pool size "
61e561c2ca53252614fbe0ba35e465c9c7afb19aDanny Mayer + size + " defaulting to " + DEFAULT_POOL_SIZE);
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer * Create and return the system timer pool.
1ee7ce8fbdd4ca2db37aba7fc7531dec5a3edfaeDanny Mayer public static synchronized TimerPool getTimerPool() {
922a15c7c07b876c7ca1dbfa871da86ddaae8d4dDanny Mayer ShutdownManager shutdownMan = ShutdownManager.getInstance();
public void shutdown() {
} catch(IllegalMonitorStateException e) {
return instance;