📄 poolmanbootstrap.java
字号:
/* * PoolMan Java Object Pooling and Caching Library * Copyright (C) 1999-2001 The Code Studio * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * The full license is located at the root of this distribution * in the LICENSE file. */package com.codestudio.management;import com.codestudio.PoolManConstants;/** * If SQLManager is invoked (which happens when DataSources, Drivers, etc. are requested) * and not yet instantiated, it will make a call to this class to bootstrap the config * and pool deployment process. This class creates a PoolManConfiguration object, which * contains data from the poolman.xml file, and then passes that config object to * the appropriate deployer depending on whether the config shows that JMX will be used * or whether simple local metadata will be used to deploy and manage pools. */public class PoolManBootstrap { public static void main(String[] args) throws Exception { if ((args == null) || (args.length == 0)) { new PoolManBootstrap(); } else if (args.length == 1) { new PoolManBootstrap(args[0]); } else { System.out.println("SYNTAX: java -Djava.security.policy=" + "[your policy file] com.codestudio.management." + "PoolManBootstrap [optional: config file name]"); System.exit(1); } } public PoolManBootstrap() throws Exception { this(PoolManConstants.XML_CONFIG_FILE); } public PoolManBootstrap(String configFile) throws Exception { PoolManConfiguration config = new PoolManConfiguration(configFile); config.loadConfiguration(); PoolManDeployer deployer; if (config.isUsingJMX()) { deployer = new JMXPoolDeployer(); deployer.deployConfiguration(config); } else { deployer = new LocalPoolDeployer(); deployer.deployConfiguration(config); } // SET STATUS com.codestudio.sql.PoolMan.STARTED = true; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -