Project

General

Profile

« Previous | Next » 

Revision 2761

Added by sgarg over 18 years ago

Moved printMessage statements to inside the if loop so that they are not printed each time getInstance is called

View differences:

DBConnectionPool.java
95 95
  public static synchronized DBConnectionPool getInstance()
96 96
                                 throws SQLException 
97 97
  {
98
    MetaCatUtil.printMessage
99
                      ("MaximumConnectionNumber: "+MAXIMUMCONNECTIONNUMBER);
100
    MetaCatUtil.printMessage
101
                     ("Intial connection number: "+INITIALCONNECTIONNUMBER);
102
    MetaCatUtil.printMessage
103
                 ("Increated connection Number: "+INCREASECONNECTIONNUMBER);
104
    MetaCatUtil.printMessage
105
                  ("Maximum connection age: "+MAXIMUMAGE);
106
    MetaCatUtil.printMessage
107
                  ("Maximum connection time: "+MAXIMUMCONNECTIONTIME);
108
    MetaCatUtil.printMessage
109
                  ("Maximum usage count: "+MAXIMUMUSAGENUMBER);
110
    MetaCatUtil.printMessage
111
             ("Running recycle thread or not: "+DBCONNECTIONRECYCLETHREAD);
112
    MetaCatUtil.printMessage
113
             ("Cycle time of recycle: "+CYCLETIMEOFDBCONNECTION); 
114 98
    if (instance == null) {
115 99
      instance = new DBConnectionPool();
100
      MetaCatUtil.printMessage
101
      	("MaximumConnectionNumber: "+MAXIMUMCONNECTIONNUMBER);
102
      MetaCatUtil.printMessage
103
      	("Intial connection number: "+INITIALCONNECTIONNUMBER);
104
      MetaCatUtil.printMessage
105
      	("Increated connection Number: "+INCREASECONNECTIONNUMBER);
106
      MetaCatUtil.printMessage
107
      	("Maximum connection age: "+MAXIMUMAGE);
108
      MetaCatUtil.printMessage
109
      	("Maximum connection time: "+MAXIMUMCONNECTIONTIME);
110
      MetaCatUtil.printMessage
111
      	("Maximum usage count: "+MAXIMUMUSAGENUMBER);
112
      MetaCatUtil.printMessage
113
      	("Running recycle thread or not: "+DBCONNECTIONRECYCLETHREAD);
114
      MetaCatUtil.printMessage
115
      	("Cycle time of recycle: "+CYCLETIMEOFDBCONNECTION); 
116 116
    }
117 117
    return instance;
118 118
  }//getInstance

Also available in: Unified diff