Example of a connection pool (from JIVE) (6)

Source: Internet
Author: User

// File: PropertyManager. java
// This class is useless. You can remove it, but you need to remove the references to this class in the previous classes.
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
* 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 shoshould probably ignore this class.
* <P>
* This class is implemented as a singleton since extends classloaders seem
* 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 ){

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.