最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个连接池的例子(来自JIVE)(6)
时间:2022-07-02 18:19:06 编辑:袖梨 来源:一聚教程网
//这个类其实没什么用了,可以去掉,但需要去掉前面几个类中对这个类的引用。
package com.qingtuo.db.pool;
import java.util.*;
import java.io.*;
/**
* Manages properties for the entire Jive system. Properties are merely
* pieces of information that need to be saved in between server restarts.
*
* At the moment, properties are stored in a Java Properties file. In a version
* of Jive coming soon, the properties file format will move to XML. XML
* properties will allow hierarchical property structures which may mean the
* API of this class will have to change.
*
* Jive properties are only meant to be set and retrevied by core Jive classes.
* Therefore, skin writers should probably ignore this class.
*
* This class is implemented as a singleton since many classloaders seem to
* take issue with doing classpath resource loading from a static context.
*/
public class PropertyManager {
private static PropertyManager manager = null;
private static Object managerLock = new Object();
private static String propsName = "/pcc_2000.properties";
/**
* Returns a Jive property
*
* @param name the name of the property to return.
* @returns the property value specified by name.
*/
public static String getProperty(String name) {
if (manager == null) {
synchronized(managerLock) {
if (manager == null) {
相关文章
- 云星穹铁道权益升级怎么玩 云崩铁权益升级活动介绍 12-03
- 以闪亮之名山中绘梦怎么玩 以闪亮之名滢然花梦套装活动介绍 12-03
- 以闪亮之名绿野梦歌礼包怎么样 以闪亮之名绿野梦歌拍照礼包介绍 12-03
- 光遇12.6有什么更新 光遇12月6日更新内容介绍 12-03
- 伍六七暗影交锋测试资格怎么获得 伍六七暗影交锋内测资格获取方法 12-03
- 无限暖暖晶莹诗集怎么样 12-03