Jquery中文网 www.jquerycn.cn
Jquery中文网 >  脚本编程  >  java  >  正文 一个连接池的例子(来自JIVE)(6)

一个连接池的例子(来自JIVE)(6)

发布时间:2019-10-06   编辑:www.jquerycn.cn
jquery中文网为您提供一个连接池的例子(来自JIVE)(6)等资源,欢迎您收藏本站,我们将为您提供最新的一个连接池的例子(来自JIVE)(6)资源
<script>ec(2);</script>
//文件:PropertyManager.java
//这个类其实没什么用了,可以去掉,但需要去掉前面几个类中对这个类的引用。
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.
* <p>
* 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.
* <p>
* Jive properties are only meant to be set and retrevied by core Jive classes.
* Therefore, skin writers should probably ignore this class.
* <p>
* 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) {

您可能感兴趣的文章:
一种实现数据库连接池的方法(2)
Tomcat下配置SQLServer连接池的方法步骤
jdbc连接oracle数据库方法
asp.net性能优化方法-数据库访问性能优化
DB2数据库设计和最高性能原则
Tomcat配置SQLServer连接池
PHP生成随机字符串的两种办法
Cobar基于MySQL的分布式数据库服务中间件
IIS中ASP.net调试时进程被打断的调整
javascript字符串连接类代码一例

[关闭]