public static synchronized void markClosed(PooledDataSource pds) { unclosedPooledDataSources.remove(pds); mc.attemptUnmanagePooledDataSource(pds); if (unclosedPooledDataSources.isEmpty()) { mc.attemptUnmanageC3P0Registry(); registry_mbean_registered = false; } }
// must be called with class' lock private static void incorporate(IdentityTokenized idt) { tokensToTokenized.put(idt.getIdentityToken(), idt); if (idt instanceof PooledDataSource) { unclosedPooledDataSources.add(idt); mc.attemptManagePooledDataSource((PooledDataSource) idt); } }
// must be called from a static, sync'ed method private static void attemptRegisterRegistryMBean() { if (!registry_mbean_registered) { mc.attemptManageC3P0Registry(); registry_mbean_registered = true; } }