KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > proxool > ConnectionPoolDefinition


1 /*
2  * This software is released under a licence similar to the Apache Software Licence.
3  * See org.logicalcobwebs.proxool.package.html for details.
4  * The latest version is available at http://proxool.sourceforge.net
5  */

6 package org.logicalcobwebs.proxool;
7
8 import org.apache.commons.logging.Log;
9 import org.apache.commons.logging.LogFactory;
10
11 import java.sql.Driver JavaDoc;
12 import java.sql.DriverManager JavaDoc;
13 import java.sql.SQLException JavaDoc;
14 import java.util.HashSet JavaDoc;
15 import java.util.Iterator JavaDoc;
16 import java.util.Properties JavaDoc;
17 import java.util.Set JavaDoc;
18 import java.util.StringTokenizer JavaDoc;
19 import java.lang.reflect.Modifier JavaDoc;
20
21 /**
22  * This defines a connection pool: the URL to connect to the database, the
23  * delegate driver to use, and how the pool behaves.
24  * @version $Revision: 1.34 $, $Date: 2006/01/18 14:40:01 $
25  * @author billhorsman
26  * @author $Author: billhorsman $ (current maintainer)
27  */

28 class ConnectionPoolDefinition implements ConnectionPoolDefinitionIF {
29
30     // TODO Should we check for defintion reads whilst updating?
31

32     private static final Log LOG = LogFactory.getLog(ConnectionPoolDefinition.class);
33
34     /**
35      * This log has a category based on the alias
36      */

37     private Log poolLog = LOG;;
38
39     private String JavaDoc alias;
40
41     // JNDI properties
42

43     private String JavaDoc jndiName;
44
45     private String JavaDoc initialContextFactory;
46
47     private String JavaDoc providerUrl;
48
49     private String JavaDoc securityAuthentication;
50
51     private String JavaDoc securityPrincipal;
52
53     private String JavaDoc securityCredentials;
54
55     private Properties JavaDoc delegateProperties = new Properties JavaDoc();
56
57     private Properties JavaDoc completeInfo = new Properties JavaDoc();
58
59     private Properties JavaDoc changedInfo = new Properties JavaDoc();
60
61     /**
62      * Whether any of the properties that effect an individual
63      * connection have changed. If they have, we need to kill
64      * all the existing connections.
65      */

66     private boolean connectionPropertiesChanged;
67
68     private String JavaDoc url;
69
70     private String JavaDoc completeUrl;
71
72     private String JavaDoc driver;
73
74     private int maximumConnectionLifetime;;
75
76     private int prototypeCount;
77
78     private int minimumConnectionCount;
79
80     private int maximumConnectionCount;
81
82     private int houseKeepingSleepTime;
83
84     private int simultaneousBuildThrottle;
85
86     private int recentlyStartedThreshold;
87
88     private int overloadWithoutRefusalLifetime;
89
90     private int maximumActiveTime;
91
92     private boolean verbose;
93
94     private boolean trace;
95
96     private String JavaDoc statistics;
97
98     private String JavaDoc statisticsLogLevel;
99
100     private Set JavaDoc fatalSqlExceptions = new HashSet JavaDoc();
101
102     /**
103      * A String of all the fatalSqlExceptions delimited by
104      * {@link ConnectionPoolDefinitionIF#FATAL_SQL_EXCEPTIONS_DELIMITER}
105      */

106     private String JavaDoc fatalSqlExceptionsAsString;
107
108     private String JavaDoc fatalSqlExceptionWrapper = null;
109
110     private String JavaDoc houseKeepingTestSql;
111
112     private boolean testBeforeUse;
113
114     private boolean testAfterUse;
115
116     private boolean jmx;
117
118     private String JavaDoc jmxAgentId;
119
120     private Class JavaDoc injectableConnectionInterface;
121
122     private Class JavaDoc injectableStatementInterface;
123
124     private Class JavaDoc injectablePreparedStatementInterface;
125
126     private Class JavaDoc injectableCallableStatementInterface;
127
128     /**
129      * So we can set the values one by one if we want
130      */

131     public ConnectionPoolDefinition() {
132     }
133
134     /**
135      * Construct a new definition
136      * @param url the url that defines this pool
137      * @param info additional properties (for Proxool and the delegate
138      * driver)
139      * @param explicitRegister set to true if we are registering a new pool explicitly, or false
140      * if it's just because we are serving a url that we haven't come across before
141      * @throws ProxoolException if anything goes wrong
142      */

143     protected ConnectionPoolDefinition(String JavaDoc url, Properties JavaDoc info, boolean explicitRegister) throws ProxoolException {
144         this.alias = ProxoolFacade.getAlias(url);
145         poolLog = LogFactory.getLog("org.logicalcobwebs.proxool." + alias);
146         reset();
147         doChange(url, info, false, !explicitRegister);
148     }
149
150     /**
151      * Update the definition. All existing properties are retained
152      * and only overwritten if included in the info parameter
153      * @param url the url that defines this pool
154      * @param info additional properties (for Proxool and the delegate
155      * driver)
156      * @throws ProxoolException if anything goes wrong
157      */

158     protected void update(String JavaDoc url, Properties JavaDoc info) throws ProxoolException {
159         changedInfo.clear();
160         connectionPropertiesChanged = false;
161         poolLog.debug("Updating definition");
162         doChange(url, info, false, false);
163         if (connectionPropertiesChanged) {
164             poolLog.info("Mercifully killing all current connections because of definition changes");
165             ProxoolFacade.killAllConnections(alias, "of definition changes", true);
166         }
167     }
168
169     /**
170      * Redefine the definition. All existing properties are reset to their
171      * default values
172      * @param url the url that defines this pool
173      * @param info additional properties (for Proxool and the delegate
174      * driver)
175      * @throws ProxoolException if anything goes wrong
176      */

177     protected void redefine(String JavaDoc url, Properties JavaDoc info) throws ProxoolException {
178         reset();
179         changedInfo.clear();
180         connectionPropertiesChanged = false;
181         poolLog.debug("Redefining definition");
182         doChange(url, info, false, false);
183
184         // Check for minimum information
185
if (getUrl() == null || getDriver() == null) {
186             throw new ProxoolException("The URL is not defined properly: " + getCompleteUrl());
187         }
188
189         if (connectionPropertiesChanged) {
190             LOG.info("Mercifully killing all current connections because of definition changes");
191             ProxoolFacade.killAllConnections(alias, "definition has changed", true);
192         }
193     }
194
195     private boolean doChange(String JavaDoc url, Properties JavaDoc info, boolean pretend, boolean implicitRegister) throws ProxoolException {
196
197         boolean changed = false;
198
199         try {
200             int endOfPrefix = url.indexOf(':');
201             int endOfDriver = url.indexOf(':', endOfPrefix + 1);
202
203             if (endOfPrefix > -1 && endOfDriver > -1) {
204                 final String JavaDoc driver = url.substring(endOfPrefix + 1, endOfDriver);
205                 if (isChanged(getDriver(), driver)) {
206                     changed = true;
207                     if (!pretend) {
208                         logChange(true, ProxoolConstants.DELEGATE_DRIVER_PROPERTY, driver);
209                         setDriver(driver);
210                     }
211                 }
212
213                 final String JavaDoc delegateUrl = url.substring(endOfDriver + 1);
214                 if (isChanged(getUrl(), delegateUrl)) {
215                     changed = true;
216                     if (!pretend) {
217                         logChange(true, ProxoolConstants.DELEGATE_URL_PROPERTY, delegateUrl);
218                         setUrl(delegateUrl);
219                     }
220                 }
221             } else {
222                 // Using alias. Nothing to do
223
}
224         } catch (IndexOutOfBoundsException JavaDoc e) {
225             LOG.error("Invalid URL: '" + url + "'", e);
226             throw new ProxoolException("Invalid URL: '" + url + "'");
227         }
228
229         if (!pretend) {
230             setCompleteUrl(url);
231         }
232
233         if (info != null) {
234             Iterator JavaDoc i = info.keySet().iterator();
235             while (i.hasNext()) {
236                 String JavaDoc key = (String JavaDoc) i.next();
237                 String JavaDoc value = info.getProperty(key);
238                 changed = changed | setAnyProperty(key, value, pretend);
239                 if (!pretend) {
240                     completeInfo.setProperty(key, value);
241                 }
242             }
243         }
244
245         if (!pretend) {
246             ProxoolFacade.definitionUpdated(getAlias(), this, completeInfo, changedInfo);
247         }
248
249         if ((getDriver() == null || getUrl() == null) && implicitRegister) {
250             throw new ProxoolException("Attempt to refer to a unregistered pool by its alias '" + getAlias() + "'");
251         }
252
253         return changed;
254     }
255
256     private void logChange(boolean proxoolProperty, String JavaDoc key, String JavaDoc value) {
257         if (poolLog.isDebugEnabled()) {
258             String JavaDoc displayValue = value;
259             if (key.toLowerCase().indexOf("password") > -1) {
260                 displayValue = "********";
261             }
262             poolLog.debug((proxoolProperty ? "Recognised proxool property: " : "Delegating property to driver: ") + key + "=" + displayValue);
263         }
264     }
265
266     private boolean setAnyProperty(String JavaDoc key, String JavaDoc value, boolean pretend) throws ProxoolException {
267         boolean proxoolProperty = true;
268         boolean changed = false;
269
270         // These groups of properties have been split off to make this method smaller
271
changed = changed || setHouseKeeperProperty(key, value, pretend);
272         changed = changed || setLoggingProperty(key, value, pretend);
273         changed = changed || setInjectableProperty(key, value, pretend);
274         changed = changed || setJndiProperty(key, value, pretend);
275
276         if (key.equals(ProxoolConstants.USER_PROPERTY)) {
277             proxoolProperty = false;
278             if (isChanged(getUser(), value)) {
279                 changed = true;
280                 if (!pretend) {
281                     setUser(value);
282                 }
283             }
284         } else if (key.equals(ProxoolConstants.PASSWORD_PROPERTY)) {
285             proxoolProperty = false;
286             if (isChanged(getPassword(), value)) {
287                 changed = true;
288                 if (!pretend) {
289                     setPassword(value);
290                 }
291             }
292         } else if (key.equals(ProxoolConstants.DELEGATE_DRIVER_PROPERTY)) {
293             if (isChanged(getDriver(), value)) {
294                 changed = true;
295                 if (!pretend) {
296                     setDriver(value);
297                 }
298             }
299         } else if (key.equals(ProxoolConstants.DELEGATE_URL_PROPERTY)) {
300             if (isChanged(getUrl(), value)) {
301                 changed = true;
302                 if (!pretend) {
303                     setUrl(value);
304                 }
305             }
306         } else if (key.equals(ProxoolConstants.MAXIMUM_CONNECTION_COUNT_PROPERTY)) {
307             if (getMaximumConnectionCount() != getInt(key, value)) {
308                 changed = true;
309                 if (!pretend) {
310                     setMaximumConnectionCount(getInt(key, value));
311                 }
312             }
313         } else if (key.equals(ProxoolConstants.MAXIMUM_CONNECTION_LIFETIME_PROPERTY)) {
314             if (getMaximumConnectionLifetime() != getInt(key, value)) {
315                 changed = true;
316                 if (!pretend) {
317                     setMaximumConnectionLifetime(getInt(key, value));
318                 }
319             }
320         } else if (key.equals(ProxoolConstants.MAXIMUM_NEW_CONNECTIONS_PROPERTY)) {
321             poolLog.warn("Use of " + ProxoolConstants.MAXIMUM_NEW_CONNECTIONS_PROPERTY + " is deprecated. Use more descriptive " + ProxoolConstants.SIMULTANEOUS_BUILD_THROTTLE_PROPERTY + " instead.");
322             if (getSimultaneousBuildThrottle() != getInt(key, value)) {
323                 changed = true;
324                 if (!pretend) {
325                     setSimultaneousBuildThrottle(getInt(key, value));
326                 }
327             }
328         } else if (key.equals(ProxoolConstants.SIMULTANEOUS_BUILD_THROTTLE_PROPERTY)) {
329             if (getSimultaneousBuildThrottle() != getInt(key, value)) {
330                 changed = true;
331                 setSimultaneousBuildThrottle(getInt(key, value));
332             }
333         } else if (key.equals(ProxoolConstants.MINIMUM_CONNECTION_COUNT_PROPERTY)) {
334             if (getMinimumConnectionCount() != getInt(key, value)) {
335                 changed = true;
336                 if (!pretend) {
337                     setMinimumConnectionCount(getInt(key, value));
338                 }
339             }
340         } else if (key.equals(ProxoolConstants.PROTOTYPE_COUNT_PROPERTY)) {
341             if (getPrototypeCount() != getInt(key, value)) {
342                 changed = true;
343                 if (!pretend) {
344                     setPrototypeCount(getInt(key, value));
345                 }
346             }
347         } else if (key.equals(ProxoolConstants.RECENTLY_STARTED_THRESHOLD_PROPERTY)) {
348             if (getRecentlyStartedThreshold() != getInt(key, value)) {
349                 changed = true;
350                 if (!pretend) {
351                     setRecentlyStartedThreshold(getInt(key, value));
352                 }
353             }
354         } else if (key.equals(ProxoolConstants.OVERLOAD_WITHOUT_REFUSAL_LIFETIME_PROPERTY)) {
355             if (getOverloadWithoutRefusalLifetime() != getInt(key, value)) {
356                 changed = true;
357                 if (!pretend) {
358                     setOverloadWithoutRefusalLifetime(getInt(key, value));
359                 }
360             }
361         } else if (key.equals(ProxoolConstants.MAXIMUM_ACTIVE_TIME_PROPERTY)) {
362             if (getMaximumActiveTime() != getInt(key, value)) {
363                 changed = true;
364                 if (!pretend) {
365                     setMaximumActiveTime(getInt(key, value));
366                 }
367             }
368         } else if (key.equals(ProxoolConstants.FATAL_SQL_EXCEPTION_PROPERTY)) {
369             if (isChanged(fatalSqlExceptionsAsString, value)) {
370                 changed = true;
371                 if (!pretend) {
372                     setFatalSqlExceptionsAsString(value.length() > 0 ? value : null);
373                 }
374             }
375         } else if (key.equals(ProxoolConstants.FATAL_SQL_EXCEPTION_WRAPPER_CLASS_PROPERTY)) {
376             if (isChanged(fatalSqlExceptionWrapper, value)) {
377                 changed = true;
378                 if (!pretend) {
379                     setFatalSqlExceptionWrapper(value.length() > 0 ? value : null);
380                 }
381             }
382         } else if (key.equals(ProxoolConstants.STATISTICS_PROPERTY)) {
383             if (isChanged(getStatistics(), value)) {
384                 changed = true;
385                 if (!pretend) {
386                     setStatistics(value.length() > 0 ? value : null);
387                 }
388             }
389         } else if (key.equals(ProxoolConstants.STATISTICS_LOG_LEVEL_PROPERTY)) {
390             if (isChanged(getStatisticsLogLevel(), value)) {
391                 changed = true;
392                 if (!pretend) {
393                     setStatisticsLogLevel(value.length() > 0 ? value : null);
394                 }
395             }
396         }
397
398         if (!key.startsWith(ProxoolConstants.PROPERTY_PREFIX)) {
399             if (isChanged(getDelegateProperty(key), value)) {
400                 changed = true;
401                 if (!pretend) {
402                     setDelegateProperty(key, value);
403                 }
404             }
405             proxoolProperty = false;
406         }
407
408         if (changed && !pretend) {
409             logChange(proxoolProperty, key, value);
410             changedInfo.setProperty(key, value);
411         }
412         return changed;
413     }
414
415     /**
416      * Subset of {@link #setAnyProperty} to avoid overly long method
417      * @see #setAnyProperty
418      */

419     private boolean setLoggingProperty(String JavaDoc key, String JavaDoc value, boolean pretend) {
420         boolean changed = false;
421         if (key.equals(ProxoolConstants.DEBUG_LEVEL_PROPERTY)) {
422             if (value != null && value.equals("1")) {
423                 poolLog.warn("Use of " + ProxoolConstants.DEBUG_LEVEL_PROPERTY + "=1 is deprecated. Use " + ProxoolConstants.VERBOSE_PROPERTY + "=true instead.");
424                 if (!isVerbose()) {
425                     changed = true;
426                     if (!pretend) {
427                         setVerbose(true);
428                     }
429                 }
430             } else {
431                 poolLog.warn("Use of " + ProxoolConstants.DEBUG_LEVEL_PROPERTY + "=0 is deprecated. Use " + ProxoolConstants.VERBOSE_PROPERTY + "=false instead.");
432                 if (isVerbose()) {
433                     changed = true;
434                     if (!pretend) {
435                         setVerbose(false);
436                     }
437                 }
438             }
439         } else if (key.equals(ProxoolConstants.VERBOSE_PROPERTY)) {
440             final boolean valueAsBoolean = Boolean.valueOf(value).booleanValue();
441             if (isVerbose() != valueAsBoolean) {
442                 changed = true;
443                 if (!pretend) {
444                     setVerbose(valueAsBoolean);
445                 }
446             }
447         } else if (key.equals(ProxoolConstants.TRACE_PROPERTY)) {
448             final boolean valueAsBoolean = Boolean.valueOf(value).booleanValue();
449             if (isTrace() != valueAsBoolean) {
450                 changed = true;
451                 if (!pretend) {
452                     setTrace(valueAsBoolean);
453                 }
454             }
455         }
456         return changed;
457     }
458
459     /**
460      * Subset of {@link #setAnyProperty} to avoid overly long method
461      * @see #setAnyProperty
462      */

463     private boolean setInjectableProperty(String JavaDoc key, String JavaDoc value, boolean pretend) {
464         boolean changed = false;
465         if (key.equals(ProxoolConstants.INJECTABLE_CONNECTION_INTERFACE_NAME_PROPERTY)) {
466             if (isChanged(getInjectableConnectionInterfaceName(), value)) {
467                 changed = true;
468                 if (!pretend) {
469                     setInjectableConnectionInterfaceName(value.length() > 0 ? value : null);
470                 }
471             }
472         } else if (key.equals(ProxoolConstants.INJECTABLE_STATEMENT_INTERFACE_NAME_PROPERTY)) {
473             if (isChanged(getInjectableStatementInterfaceName(), value)) {
474                 changed = true;
475                 if (!pretend) {
476                     setInjectableStatementInterfaceName(value.length() > 0 ? value : null);
477                 }
478             }
479         } else if (key.equals(ProxoolConstants.INJECTABLE_PREPARED_STATEMENT_INTERFACE_NAME_PROPERTY)) {
480             if (isChanged(getInjectablePreparedStatementInterfaceName(), value)) {
481                 changed = true;
482                 if (!pretend) {
483                     setInjectablePreparedStatementInterfaceName(value.length() > 0 ? value : null);
484                 }
485             }
486         } else if (key.equals(ProxoolConstants.INJECTABLE_CALLABLE_STATEMENT_INTERFACE_NAME_PROPERTY)) {
487             if (isChanged(getInjectableCallableStatememtInterfaceName(), value)) {
488                 changed = true;
489                 if (!pretend) {
490                     setInjectableCallableStatementInterfaceName(value.length() > 0 ? value : null);
491                 }
492             }
493         }
494         return changed;
495     }
496
497     /**
498      * Subset of {@link #setAnyProperty} to avoid overly long method.
499      * @see #setAnyProperty
500      */

501     private boolean setHouseKeeperProperty(String JavaDoc key, String JavaDoc value, boolean pretend) throws ProxoolException {
502         boolean changed = false;
503         if (key.equals(ProxoolConstants.HOUSE_KEEPING_SLEEP_TIME_PROPERTY)) {
504             if (getHouseKeepingSleepTime() != getInt(key, value)) {
505                 changed = true;
506                 if (!pretend) {
507                     setHouseKeepingSleepTime(getInt(key, value));
508                 }
509             }
510         } else if (key.equals(ProxoolConstants.HOUSE_KEEPING_TEST_SQL_PROPERTY)) {
511             if (isChanged(getHouseKeepingTestSql(), value)) {
512                 changed = true;
513                 if (!pretend) {
514                     setHouseKeepingTestSql(value.length() > 0 ? value : null);
515                 }
516             }
517         } else if (key.equals(ProxoolConstants.TEST_BEFORE_USE_PROPERTY)) {
518             final boolean valueAsBoolean = Boolean.valueOf(value).booleanValue();
519             if (isTestBeforeUse() != valueAsBoolean) {
520                 changed = true;
521                 if (!pretend) {
522                     setTestBeforeUse(valueAsBoolean);
523                 }
524             }
525         } else if (key.equals(ProxoolConstants.TEST_AFTER_USE_PROPERTY)) {
526             final boolean valueAsBoolean = Boolean.valueOf(value).booleanValue();
527             if (isTestAfterUse() != valueAsBoolean) {
528                 changed = true;
529                 if (!pretend) {
530                     setTestAfterUse(valueAsBoolean);
531                 }
532             }
533         }
534         return changed;
535     }
536
537     /**
538      * Subset of {@link #setAnyProperty} to avoid overly long method
539      * @see #setAnyProperty
540      */

541     private boolean setJndiProperty(String JavaDoc key, String JavaDoc value, boolean pretend) {
542         boolean changed = false;
543         if (key.equals(ProxoolConstants.JNDI_NAME_PROPERTY)) {
544             if (isChanged(getJndiName(), value)) {
545                 changed = true;
546                 if (!pretend) {
547                     setJndiName(value.length() > 0 ? value : null);
548                 }
549             }
550         } else {
551
552         }
553         return changed;
554     }
555     private int getInt(String JavaDoc key, String JavaDoc value) throws ProxoolException {
556         try {
557             return Integer.parseInt(value);
558         } catch (NumberFormatException JavaDoc e) {
559             throw new ProxoolException("'" + key + "' property must be an integer. Found '" + value + "' instead.");
560         }
561     }
562
563     private static boolean isChanged(String JavaDoc oldValue, String JavaDoc newValue) {
564         boolean changed = false;
565         if (oldValue == null) {
566             if (newValue != null) {
567                 changed = true;
568             }
569         } else if (newValue == null) {
570             changed = true;
571         } else if (!oldValue.equals(newValue)) {
572             changed = true;
573         }
574         return changed;
575     }
576
577     /**
578      * Deep clone of definition
579      * @return the new definition
580      * @throws CloneNotSupportedException
581      */

582     protected Object JavaDoc clone() throws CloneNotSupportedException JavaDoc {
583         ConnectionPoolDefinition clone = new ConnectionPoolDefinition();
584
585         clone.setCompleteUrl(completeUrl);
586         clone.setDelegateProperties((Properties JavaDoc) delegateProperties.clone());
587         clone.setCompleteInfo((Properties JavaDoc) completeInfo.clone());
588         clone.clearChangedInfo();
589
590         clone.setAlias(alias);
591         clone.setUrl(url);
592         clone.setDriver(driver);
593         clone.setMaximumConnectionLifetime(maximumConnectionLifetime);
594         clone.setPrototypeCount(prototypeCount);
595         clone.setMinimumConnectionCount(minimumConnectionCount);
596         clone.setMaximumConnectionCount(maximumConnectionCount);
597         clone.setHouseKeepingSleepTime(houseKeepingSleepTime);
598         clone.setHouseKeepingTestSql(houseKeepingTestSql);
599         clone.setTestAfterUse(testAfterUse);
600         clone.setTestBeforeUse(testBeforeUse);
601         clone.setSimultaneousBuildThrottle(simultaneousBuildThrottle);
602         clone.setRecentlyStartedThreshold(recentlyStartedThreshold);
603         clone.setOverloadWithoutRefusalLifetime(overloadWithoutRefusalLifetime);
604         clone.setMaximumActiveTime(maximumActiveTime);
605         clone.setVerbose(verbose);
606         clone.setTrace(trace);
607         clone.setStatistics(statistics);
608         clone.setStatisticsLogLevel(statisticsLogLevel);
609         clone.setFatalSqlExceptionsAsString(fatalSqlExceptionsAsString);
610         try {
611             clone.setFatalSqlExceptionWrapper(fatalSqlExceptionWrapper);
612         } catch (ProxoolException e) {
613             throw new IllegalArgumentException JavaDoc("Problem cloning fatalSqlExceptionWrapper: " + fatalSqlExceptionWrapper);
614         }
615         return clone;
616     }
617
618     private void clearChangedInfo() {
619         changedInfo.clear();
620     }
621
622     /**
623      * Reset all properties to their default values
624      */

625     private void reset() {
626         completeUrl = null;
627         delegateProperties.clear();
628         completeInfo.clear();
629         changedInfo.clear();
630
631         url = null;
632         driver = null;
633         maximumConnectionLifetime = DEFAULT_MAXIMUM_CONNECTION_LIFETIME;
634         prototypeCount = DEFAULT_PROTOTYPE_COUNT;
635         minimumConnectionCount = DEFAULT_MINIMUM_CONNECTION_COUNT;
636         maximumConnectionCount = DEFAULT_MAXIMUM_CONNECTION_COUNT;
637         houseKeepingSleepTime = DEFAULT_HOUSE_KEEPING_SLEEP_TIME;
638         houseKeepingTestSql = null;
639         testAfterUse = false;
640         testBeforeUse = false;
641         simultaneousBuildThrottle = DEFAULT_SIMULTANEOUS_BUILD_THROTTLE;
642         recentlyStartedThreshold = DEFAULT_RECENTLY_STARTED_THRESHOLD;
643         overloadWithoutRefusalLifetime = DEFAULT_OVERLOAD_WITHOUT_REFUSAL_THRESHOLD;
644         maximumActiveTime = DEFAULT_MAXIMUM_ACTIVE_TIME;
645         verbose = false;
646         trace = false;
647         statistics = null;
648         statisticsLogLevel = null;
649         fatalSqlExceptions.clear();
650         fatalSqlExceptionWrapper = null;
651     }
652
653     /**
654      * Get all the properties used to define this pool
655      * @return
656      */

657     protected Properties JavaDoc getCompleteInfo() {
658         return completeInfo;
659     }
660
661     /**
662      * Overwrite the complete info
663      * @param completeInfo the new properties
664      * @see #getCompleteInfo()
665      */

666     public void setCompleteInfo(Properties JavaDoc completeInfo) {
667         this.completeInfo = completeInfo;
668     }
669
670     /**
671      * @see ConnectionPoolDefinitionIF#getUser
672      */

673     public String JavaDoc getUser() {
674         return getDelegateProperty(USER_PROPERTY);
675     }
676
677     /**
678      * @see ConnectionPoolDefinitionIF#getUser
679      */

680     public void setUser(String JavaDoc user) {
681         setDelegateProperty(USER_PROPERTY, user);
682     }
683
684     /**
685      * @see ConnectionPoolDefinitionIF#getPassword
686      */

687     public String JavaDoc getPassword() {
688         return getDelegateProperty(PASSWORD_PROPERTY);
689     }
690
691     /**
692      * @see ConnectionPoolDefinitionIF#getPassword
693      */

694     public void setPassword(String JavaDoc password) {
695         setDelegateProperty(PASSWORD_PROPERTY, password);
696     }
697
698     /**
699      * @see ConnectionPoolDefinitionIF#getJdbcDriverVersion
700      */

701     public String JavaDoc getJdbcDriverVersion() {
702
703         try {
704             Driver JavaDoc driver = DriverManager.getDriver(getUrl());
705             return driver.getMajorVersion() + "." + driver.getMinorVersion();
706         } catch (SQLException JavaDoc e) {
707             return "Trying to locate driver version for '" + getUrl() + "' caused: " + e.toString();
708         } catch (NullPointerException JavaDoc e) {
709             return "Couldn't locate driver for '" + getUrl() + "'!";
710         }
711
712     }
713
714     /**
715      * @see Object#toString
716      */

717     public String JavaDoc toString() {
718         return getCompleteUrl();
719     }
720
721     /**
722      * @see ConnectionPoolDefinitionIF#getName
723      * @deprecated use {@link #getAlias}
724      */

725     public String JavaDoc getName() {
726         return alias;
727     }
728
729     /**
730      * @see ConnectionPoolDefinitionIF#getAlias
731      */

732     public String JavaDoc getAlias() {
733         return alias;
734     }
735
736     /**
737      * @see ConnectionPoolDefinitionIF#getAlias
738      */

739     public void setAlias(String JavaDoc alias) {
740         this.alias = alias;
741     }
742
743     /**
744      * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime
745      */

746     public int getMaximumConnectionLifetime() {
747         return maximumConnectionLifetime;
748     }
749
750     /**
751      * @see ConnectionPoolDefinitionIF#getMaximumConnectionLifetime
752      */

753     public void setMaximumConnectionLifetime(int maximumConnectionLifetime) {
754         this.maximumConnectionLifetime = maximumConnectionLifetime;
755     }
756
757     /**
758      * @see ConnectionPoolDefinitionIF#getPrototypeCount
759      */

760     public int getPrototypeCount() {
761         return prototypeCount;
762     }
763
764     /**
765      * @see ConnectionPoolDefinitionIF#getPrototypeCount
766      */

767     public void setPrototypeCount(int prototypeCount) {
768         this.prototypeCount = prototypeCount;
769     }
770
771     /**
772      * @see ConnectionPoolDefinitionIF#getMinimumConnectionCount
773      */

774     public int getMinimumConnectionCount() {
775         return minimumConnectionCount;
776     }
777
778     /**
779      * @see ConnectionPoolDefinitionIF#getMinimumConnectionCount
780      */

781     public void setMinimumConnectionCount(int minimumConnectionCount) {
782         this.minimumConnectionCount = minimumConnectionCount;
783     }
784
785     /**
786      * @see ConnectionPoolDefinitionIF#getMaximumConnectionCount
787      */

788     public int getMaximumConnectionCount() {
789         return maximumConnectionCount;
790     }
791
792     /**
793      * @see ConnectionPoolDefinitionIF#getMaximumConnectionCount
794      */

795     public void setMaximumConnectionCount(int maximumConnectionCount) {
796         this.maximumConnectionCount = maximumConnectionCount;
797     }
798
799     /**
800      * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
801      */

802     public int getHouseKeepingSleepTime() {
803         return houseKeepingSleepTime;
804     }
805
806     /**
807      * @see ConnectionPoolDefinitionIF#getHouseKeepingSleepTime
808      */

809     public void setHouseKeepingSleepTime(int houseKeepingSleepTime) {
810         this.houseKeepingSleepTime = houseKeepingSleepTime;
811     }
812
813     /**
814      * @see ConnectionPoolDefinitionIF#getMaximumNewConnections
815      * @deprecated use more descriptive {@link #getSimultaneousBuildThrottle} instead
816      */

817     public int getMaximumNewConnections() {
818         return simultaneousBuildThrottle;
819     }
820
821     /**
822      * @see ConnectionPoolDefinitionIF#getMaximumNewConnections
823      * @deprecated use more descriptive {@link #setSimultaneousBuildThrottle} instead
824      */

825     public void setMaximumNewConnections(int maximumNewConnections) {
826         this.simultaneousBuildThrottle = maximumNewConnections;
827     }
828
829     /**
830      * @see ConnectionPoolDefinitionIF#getSimultaneousBuildThrottle
831      */

832     public int getSimultaneousBuildThrottle() {
833         return simultaneousBuildThrottle;
834     }
835
836     /**
837      * @see ConnectionPoolDefinitionIF#getSimultaneousBuildThrottle
838      */

839     public void setSimultaneousBuildThrottle(int simultaneousBuildThrottle) {
840         this.simultaneousBuildThrottle = simultaneousBuildThrottle;
841     }
842
843     /**
844      * @see ConnectionPoolDefinitionIF#getProperties
845      * @deprecated use less ambiguous {@link #getDelegateProperties} instead
846      */

847     public Properties JavaDoc getProperties() {
848         return delegateProperties;
849     }
850
851     /**
852      * @see ConnectionPoolDefinitionIF#getDelegateProperties
853      */

854     public Properties JavaDoc getDelegateProperties() {
855         return delegateProperties;
856     }
857
858     /**
859      * Get a property
860      * @param name the name of the property
861      * @return the value of the property
862      */

863     public String JavaDoc getDelegateProperty(String JavaDoc name) {
864         return getDelegateProperties().getProperty(name);
865     }
866
867     /**
868      * Set a property
869      * @param name the name of the property
870      * @param value the value of the property
871      * @see ConnectionPoolDefinitionIF#getProperties
872      */

873     public void setDelegateProperty(String JavaDoc name, String JavaDoc value) {
874         connectionPropertiesChanged = true;
875         getDelegateProperties().setProperty(name, value);
876     }
877
878     /**
879      * Overwrite the delegate properties
880      * @param delegateProperties the new properties
881      * @see ConnectionPoolDefinitionIF#getProperties
882      */

883     public void setDelegateProperties(Properties JavaDoc delegateProperties) {
884         this.delegateProperties = delegateProperties;
885     }
886
887     /**
888      * @see ConnectionPoolDefinitionIF#getUrl
889      */

890     public String JavaDoc getUrl() {
891         return url;
892     }
893
894     /**
895      * @see ConnectionPoolDefinitionIF#getUrl
896      */

897     public void setUrl(String JavaDoc url) {
898         this.url = url;
899         connectionPropertiesChanged = true;
900     }
901
902     /**
903      * @see ConnectionPoolDefinitionIF#getDriver
904      */

905     public String JavaDoc getDriver() {
906         return driver;
907     }
908
909     /**
910      * @see ConnectionPoolDefinitionIF#getDriver
911      */

912     public void setDriver(String JavaDoc driver) {
913         this.driver = driver;
914         connectionPropertiesChanged = true;
915     }
916
917     /**
918      * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold
919      */

920     public int getRecentlyStartedThreshold() {
921         return recentlyStartedThreshold;
922     }
923
924     /**
925      * @see ConnectionPoolDefinitionIF#getRecentlyStartedThreshold
926      */

927     public void setRecentlyStartedThreshold(int recentlyStartedThreshold) {
928         this.recentlyStartedThreshold = recentlyStartedThreshold;
929     }
930
931     /**
932      * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime
933      */

934     public int getOverloadWithoutRefusalLifetime() {
935         return overloadWithoutRefusalLifetime;
936     }
937
938     /**
939      * @see ConnectionPoolDefinitionIF#getOverloadWithoutRefusalLifetime
940      */

941     public void setOverloadWithoutRefusalLifetime(int overloadWithoutRefusalLifetime) {
942         this.overloadWithoutRefusalLifetime = overloadWithoutRefusalLifetime;
943     }
944
945     /**
946      * @see ConnectionPoolDefinitionIF#getMaximumActiveTime
947      */

948     public int getMaximumActiveTime() {
949         return maximumActiveTime;
950     }
951
952     /**
953      * @see ConnectionPoolDefinitionIF#getMaximumActiveTime
954      */

955     public void setMaximumActiveTime(int maximumActiveTime) {
956         this.maximumActiveTime = maximumActiveTime;
957     }
958
959     /**
960      * @see ConnectionPoolDefinitionIF#getDebugLevel
961      * @deprecated use {@link #isVerbose} instead
962      */

963     public int getDebugLevel() {
964         return (verbose ? 1 : 0);
965     }
966
967     /**
968      * @see ConnectionPoolDefinitionIF#isVerbose
969      */

970     public boolean isVerbose() {
971         return verbose;
972     }
973
974     /**
975      * @see ConnectionPoolDefinitionIF#isVerbose
976      */

977     public void setVerbose(boolean verbose) {
978         this.verbose = verbose;
979     }
980
981     /**
982      * @see ConnectionPoolDefinitionIF#isTrace
983      */

984     public boolean isTrace() {
985         return trace;
986     }
987
988     /**
989      * @see ConnectionPoolDefinitionIF#isTrace
990      */

991     public void setTrace(boolean trace) {
992         this.trace = trace;
993     }
994
995     /**
996      * @see ConnectionPoolDefinitionIF#getCompleteUrl
997      */

998     public String JavaDoc getCompleteUrl() {
999         return completeUrl;
1000    }
1001
1002    /**
1003     * @see ConnectionPoolDefinitionIF#getCompleteUrl
1004     */

1005    public void setCompleteUrl(String JavaDoc completeUrl) {
1006        this.completeUrl = completeUrl;
1007    }
1008
1009    /**
1010     * @see ConnectionPoolDefinitionIF#getFatalSqlExceptions
1011     */

1012    public void setFatalSqlExceptionsAsString(String JavaDoc fatalSqlExceptionsAsString) {
1013        this.fatalSqlExceptionsAsString = fatalSqlExceptionsAsString;
1014        fatalSqlExceptions.clear();
1015        if (fatalSqlExceptionsAsString != null) {
1016            StringTokenizer JavaDoc st = new StringTokenizer JavaDoc(fatalSqlExceptionsAsString, FATAL_SQL_EXCEPTIONS_DELIMITER);
1017            while (st.hasMoreTokens()) {
1018                fatalSqlExceptions.add(st.nextToken().trim());
1019            }
1020        }
1021    }
1022
1023    /**
1024     * @see ConnectionPoolDefinitionIF#getFatalSqlExceptions
1025     */

1026    public Set JavaDoc getFatalSqlExceptions() {
1027        return fatalSqlExceptions;
1028    }
1029
1030    /**
1031     * @see ConnectionPoolDefinitionIF#getFatalSqlExceptionWrapper
1032     */

1033    public String JavaDoc getFatalSqlExceptionWrapper() {
1034        return fatalSqlExceptionWrapper;
1035    }
1036
1037    /**
1038     * @see ConnectionPoolDefinitionIF#getFatalSqlExceptionWrapper
1039     */

1040    public void setFatalSqlExceptionWrapper(String JavaDoc fatalSqlExceptionWrapper) throws ProxoolException {
1041
1042        // Test it out. That's the best way.
1043
try {
1044            FatalSqlExceptionHelper.throwFatalSQLException(fatalSqlExceptionWrapper, new SQLException JavaDoc("Test"));
1045        } catch (SQLException JavaDoc e) {
1046            // That's OK, we were expecting one of these
1047
} catch (RuntimeException JavaDoc e) {
1048            // That's OK, we were expecting one of these
1049
}
1050
1051        this.fatalSqlExceptionWrapper = fatalSqlExceptionWrapper;
1052    }
1053
1054    /**
1055     * @see ConnectionPoolDefinitionIF#getHouseKeepingTestSql
1056     */

1057    public String JavaDoc getHouseKeepingTestSql() {
1058        return houseKeepingTestSql;
1059    }
1060
1061    /**
1062     * @see ConnectionPoolDefinitionIF#getHouseKeepingTestSql
1063     */

1064    public void setHouseKeepingTestSql(String JavaDoc houseKeepingTestSql) {
1065        this.houseKeepingTestSql = houseKeepingTestSql;
1066    }
1067
1068    /**
1069     * @see ConnectionPoolDefinitionIF#isTestBeforeUse
1070     */

1071    public boolean isTestBeforeUse() {
1072        return testBeforeUse;
1073    }
1074
1075    /**
1076     * @see ConnectionPoolDefinitionIF#isTestBeforeUse
1077     */

1078    public void setTestBeforeUse(boolean testBeforeUse) {
1079        this.testBeforeUse = testBeforeUse;
1080    }
1081
1082    /**
1083     * @see ConnectionPoolDefinitionIF#isTestAfterUse
1084     */

1085    public boolean isTestAfterUse() {
1086        return testAfterUse;
1087    }
1088
1089    /**
1090     * @see ConnectionPoolDefinitionIF#isTestAfterUse
1091     */

1092    public void setTestAfterUse(boolean testAfterUse) {
1093        this.testAfterUse = testAfterUse;
1094    }
1095
1096    /**
1097     * @see ConnectionPoolDefinitionIF#getStatistics
1098     */

1099    public String JavaDoc getStatistics() {
1100        return statistics;
1101    }
1102
1103    /**
1104     * @see ConnectionPoolDefinitionIF#getStatistics
1105     */

1106    public void setStatistics(String JavaDoc statistics) {
1107        this.statistics = statistics;
1108    }
1109
1110    /**
1111     * @see ConnectionPoolDefinitionIF#getStatisticsLogLevel
1112     */

1113    public String JavaDoc getStatisticsLogLevel() {
1114        return statisticsLogLevel;
1115    }
1116
1117    /**
1118     * @see ConnectionPoolDefinitionIF#getStatisticsLogLevel
1119     */

1120    public void setStatisticsLogLevel(String JavaDoc statisticsLogLevel) {
1121        this.statisticsLogLevel = statisticsLogLevel;
1122    }
1123
1124// Start JNDI
1125
public String JavaDoc getJndiName() {
1126        return jndiName;
1127    }
1128
1129    public void setJndiName(String JavaDoc jndiName) {
1130        this.jndiName = jndiName;
1131    }
1132
1133    public String JavaDoc getInitialContextFactory() {
1134        return initialContextFactory;
1135    }
1136
1137    public void setInitialContextFactory(String JavaDoc initialContextFactory) {
1138        this.initialContextFactory = initialContextFactory;
1139    }
1140
1141    public String JavaDoc getProviderUrl() {
1142        return providerUrl;
1143    }
1144
1145    public void setProviderUrl(String JavaDoc providerUrl) {
1146        this.providerUrl = providerUrl;
1147    }
1148
1149    public String JavaDoc getSecurityAuthentication() {
1150        return securityAuthentication;
1151    }
1152
1153    public void setSecurityAuthentication(String JavaDoc securityAuthentication) {
1154        this.securityAuthentication = securityAuthentication;
1155    }
1156
1157    public String JavaDoc getSecurityPrincipal() {
1158        return securityPrincipal;
1159    }
1160
1161    public void setSecurityPrincipal(String JavaDoc securityPrincipal) {
1162        this.securityPrincipal = securityPrincipal;
1163    }
1164
1165    public String JavaDoc getSecurityCredentials() {
1166        return securityCredentials;
1167    }
1168
1169    public void setSecurityCredentials(String JavaDoc securityCredentials) {
1170        this.securityCredentials = securityCredentials;
1171    }
1172// End JNDI
1173

1174    /**
1175     * @see ConnectionPoolDefinitionIF#isJmx()
1176     */

1177    public boolean isJmx() {
1178        return jmx;
1179    }
1180
1181    /**
1182     * @see ConnectionPoolDefinitionIF#isJmx()
1183     */

1184    public void setJmx(boolean jmx) {
1185        this.jmx = jmx;
1186    }
1187
1188    /**
1189     * @see ConnectionPoolDefinitionIF#getJmxAgentId()
1190     */

1191    public String JavaDoc getJmxAgentId() {
1192        return jmxAgentId;
1193    }
1194
1195    /**
1196     * @see ConnectionPoolDefinitionIF#getJmxAgentId()
1197     */

1198    public void setJmxAgentId(String JavaDoc jmxAgentId) {
1199        this.jmxAgentId = jmxAgentId;
1200    }
1201
1202    /**
1203     * @see ConnectionPoolDefinitionIF#getInjectableConnectionInterface()
1204     */

1205    public Class JavaDoc getInjectableConnectionInterface() {
1206        return injectableConnectionInterface;
1207    }
1208
1209    /**
1210     * @see ConnectionPoolDefinitionIF#getInjectableConnectionInterface()
1211     */

1212    public String JavaDoc getInjectableConnectionInterfaceName() {
1213        if (getInjectableConnectionInterface() != null) {
1214            return getInjectableConnectionInterface().getName();
1215        } else {
1216            return null;
1217        }
1218    }
1219
1220    /**
1221     * @param injectableConnectionInterfaceName the fully qualified class name
1222     * @see ConnectionPoolDefinitionIF#getInjectableConnectionInterface()
1223     */

1224    public void setInjectableConnectionInterfaceName(String JavaDoc injectableConnectionInterfaceName) {
1225        this.injectableConnectionInterface = getInterface(injectableConnectionInterfaceName);
1226    }
1227
1228    /**
1229     * @see ConnectionPoolDefinitionIF#getInjectableStatementInterface()
1230     */

1231    public Class JavaDoc getInjectableStatementInterface() {
1232        return injectableStatementInterface;
1233    }
1234
1235    /**
1236     * @see ConnectionPoolDefinitionIF#getInjectableStatementInterface()
1237     */

1238    public String JavaDoc getInjectableStatementInterfaceName() {
1239        if (getInjectableStatementInterface() != null) {
1240            return getInjectableStatementInterface().getName();
1241        } else {
1242            return null;
1243        }
1244    }
1245
1246    /**
1247     * @param injectableStatementInterfaceName the fully qualified class name
1248     * @see ConnectionPoolDefinitionIF#getInjectableStatementInterface()
1249     */

1250    public void setInjectableStatementInterfaceName(String JavaDoc injectableStatementInterfaceName) {
1251        this.injectableStatementInterface = getInterface(injectableStatementInterfaceName);
1252    }
1253
1254    /**
1255     * @see ConnectionPoolDefinitionIF#getInjectablePreparedStatementInterface()
1256     */

1257    public Class JavaDoc getInjectablePreparedStatementInterface() {
1258        return injectablePreparedStatementInterface;
1259    }
1260
1261    /**
1262     * @see ConnectionPoolDefinitionIF#getInjectablePreparedStatementInterface()
1263     */

1264    public String JavaDoc getInjectablePreparedStatementInterfaceName() {
1265        if (getInjectablePreparedStatementInterface() != null) {
1266            return getInjectablePreparedStatementInterface().getName();
1267        } else {
1268            return null;
1269        }
1270    }
1271
1272    /**
1273     * @param injectablePreparedStatementInterfaceName the fully qualified class name
1274     * @see ConnectionPoolDefinitionIF#getInjectablePreparedStatementInterface()
1275     */

1276    public void setInjectablePreparedStatementInterfaceName(String JavaDoc injectablePreparedStatementInterfaceName) {
1277        this.injectablePreparedStatementInterface = getInterface(injectablePreparedStatementInterfaceName);
1278    }
1279
1280    /**
1281     * @see ConnectionPoolDefinitionIF#getInjectableCallableStatementInterface()
1282     */

1283    public String JavaDoc getInjectableCallableStatememtInterfaceName() {
1284        if (getInjectableCallableStatementInterface() != null) {
1285            return getInjectableCallableStatementInterface().getName();
1286        } else {
1287            return null;
1288        }
1289    }
1290
1291    /**
1292     * @see ConnectionPoolDefinitionIF#getInjectableCallableStatementInterface()
1293     */

1294    public Class JavaDoc getInjectableCallableStatementInterface() {
1295        return injectableCallableStatementInterface;
1296    }
1297
1298    /**
1299     * @param injectableCallableStatementInterfaceName the fully qualified class name
1300     * @see ConnectionPoolDefinitionIF#getInjectableCallableStatementInterface()
1301     */

1302    public void setInjectableCallableStatementInterfaceName(String JavaDoc injectableCallableStatementInterfaceName) {
1303        this.injectableCallableStatementInterface = getInterface(injectableCallableStatementInterfaceName);
1304    }
1305
1306    private Class JavaDoc getInterface(String JavaDoc className) {
1307        try {
1308            Class JavaDoc clazz = null;
1309            if (className != null && className.length() > 0) {
1310                clazz = Class.forName(className);
1311                if (!clazz.isInterface()) {
1312                    throw new IllegalArgumentException JavaDoc(className + " is a class. It must be an interface.");
1313                }
1314                if (!Modifier.isPublic(clazz.getModifiers())) {
1315                    throw new IllegalArgumentException JavaDoc(className + " is a protected interface. It must be public.");
1316                }
1317            }
1318            return clazz;
1319        } catch (ClassNotFoundException JavaDoc e) {
1320            throw new IllegalArgumentException JavaDoc(className + " couldn't be found");
1321        }
1322    }
1323
1324    /**
1325     * Returns true if {@link #redefine redefining} the pool using
1326     * these parameters would not change the definition. You can
1327     * use this to decide whether or not to trigger a change
1328     * {@link ConfigurationListenerIF#definitionUpdated event}.
1329     *
1330     * @param url the url (containing alias and possible delegate url and driver)
1331     * @param info the properties
1332     * @return true if the definition is identical to that that represented by these parameters
1333     */

1334    public boolean isEqual(String JavaDoc url, Properties JavaDoc info) {
1335        try {
1336            return !doChange(url, info, true, false);
1337        } catch (ProxoolException e) {
1338            LOG.error("Problem checking equality", e);
1339            return false;
1340        }
1341/*
1342        boolean equal = true;
1343
1344        if (info == null && completeInfo != null) {
1345            equal = false;
1346        } else if (info != null && completeInfo == null) {
1347            equal = false;
1348        } else if (!info.equals(completeInfo)) {
1349            equal = false;
1350        } else if (!url.equals(completeUrl)) {
1351            equal = false;
1352        }
1353
1354        return equal;
1355*/

1356    }
1357
1358}
1359
1360/*
1361 Revision history:
1362 $Log: ConnectionPoolDefinition.java,v $
1363 Revision 1.34 2006/01/18 14:40:01 billhorsman
1364 Unbundled Jakarta's Commons Logging.
1365
1366 Revision 1.33 2005/05/04 16:24:59 billhorsman
1367 Now supports cloning.
1368
1369 Revision 1.32 2004/06/02 20:19:14 billhorsman
1370 Added injectable interface properties
1371
1372 Revision 1.31 2004/03/18 17:08:14 chr32
1373 Added jmx* properties.
1374
1375 Revision 1.30 2004/03/15 02:42:44 chr32
1376 Removed explicit JNDI properties. Going for a generic approach instead.
1377
1378 Revision 1.29 2003/10/30 00:13:59 billhorsman
1379 Fixed bug where all proxool properties were getting passed onto the delegate driver, and all delegate properties weren't
1380
1381 Revision 1.28 2003/10/24 15:22:21 billhorsman
1382 Fixed bug where connection pool was being recognised as changed even when it wasn't. (This bug introduced after 0.7.2).
1383
1384 Revision 1.27 2003/10/20 11:40:53 billhorsman
1385 Smarter handling of null and empty strings. No NPE during unit tests now.
1386
1387 Revision 1.26 2003/10/19 13:31:57 billhorsman
1388 Setting a property to a zero length String actually sets it to a null
1389
1390 Revision 1.25 2003/10/16 18:54:49 billhorsman
1391 Fixed javadoc for update() and redefine() methods which were transposed. Also improved exception handling for
1392 incomplete pool definitions.
1393
1394 Revision 1.24 2003/09/30 18:39:08 billhorsman
1395 New test-before-use, test-after-use and fatal-sql-exception-wrapper-class properties.
1396
1397 Revision 1.23 2003/09/29 17:48:08 billhorsman
1398 New fatal-sql-exception-wrapper-class allows you to define what exception is used as a wrapper. This means that you
1399 can make it a RuntimeException if you need to.
1400
1401 Revision 1.22 2003/09/05 16:59:42 billhorsman
1402 Added wrap-fatal-sql-exceptions property
1403
1404 Revision 1.21 2003/08/30 14:54:04 billhorsman
1405 Checkstyle
1406
1407 Revision 1.20 2003/08/30 11:37:31 billhorsman
1408 Trim fatal-sql-exception messages so that whitespace around the comma delimiters does not
1409 get used to match against exception message.
1410
1411 Revision 1.19 2003/07/23 06:54:48 billhorsman
1412 draft JNDI changes (shouldn't effect normal operation)
1413
1414 Revision 1.18 2003/04/27 15:42:21 billhorsman
1415 fix to condition that meant configuration change was getting sent too often (and sometimes not at all)
1416
1417 Revision 1.17 2003/04/19 12:58:41 billhorsman
1418 fixed bug where ConfigurationListener's
1419 definitionUpdated was getting called too
1420 frequently
1421
1422 Revision 1.16 2003/04/10 21:50:16 billhorsman
1423 empty constructor for use by DataSource
1424
1425 Revision 1.15 2003/03/11 14:51:49 billhorsman
1426 more concurrency fixes relating to snapshots
1427
1428 Revision 1.14 2003/03/10 23:43:09 billhorsman
1429 reapplied checkstyle that i'd inadvertently let
1430 IntelliJ change...
1431
1432 Revision 1.13 2003/03/10 15:26:45 billhorsman
1433 refactoringn of concurrency stuff (and some import
1434 optimisation)
1435
1436 Revision 1.12 2003/03/05 23:28:56 billhorsman
1437 deprecated maximum-new-connections property in favour of
1438 more descriptive simultaneous-build-throttle
1439
1440 Revision 1.11 2003/03/05 18:42:32 billhorsman
1441 big refactor of prototyping and house keeping to
1442 drastically reduce the number of threads when using
1443 many pools
1444
1445 Revision 1.10 2003/03/03 11:11:57 billhorsman
1446 fixed licence
1447
1448 Revision 1.9 2003/02/26 16:05:52 billhorsman
1449 widespread changes caused by refactoring the way we
1450 update and redefine pool definitions.
1451
1452 Revision 1.8 2003/02/06 15:41:17 billhorsman
1453 add statistics-log-level
1454
1455 Revision 1.7 2003/01/31 00:17:05 billhorsman
1456 statistics is now a string to allow multiple,
1457 comma-delimited values
1458
1459 Revision 1.6 2003/01/30 17:20:38 billhorsman
1460 new statistics property
1461
1462 Revision 1.5 2003/01/17 00:38:12 billhorsman
1463 wide ranging changes to clarify use of alias and url -
1464 this has led to some signature changes (new exceptions
1465 thrown) on the ProxoolFacade API.
1466
1467 Revision 1.4 2002/11/09 15:50:15 billhorsman
1468 new trace property and better doc
1469
1470 Revision 1.3 2002/10/27 13:29:38 billhorsman
1471 deprecated debug-level in favour of verbose
1472
1473 Revision 1.2 2002/10/17 19:46:02 billhorsman
1474 removed redundant reference to logFilename (we now use Jakarta's Commons Logging component
1475
1476 Revision 1.1.1.1 2002/09/13 08:13:00 billhorsman
1477 new
1478
1479 Revision 1.8 2002/07/10 16:14:47 billhorsman
1480 widespread layout changes and move constants into ProxoolConstants
1481
1482 Revision 1.7 2002/07/04 09:05:36 billhorsman
1483 Fixes
1484
1485 Revision 1.6 2002/07/02 11:19:08 billhorsman
1486 layout code and imports
1487
1488 Revision 1.5 2002/07/02 08:41:59 billhorsman
1489 No longer public - we should be confuring pools with Properties now. Also added completeUrl property so that we can access pool by either alias or full url.
1490
1491 Revision 1.4 2002/06/28 11:19:47 billhorsman
1492 improved doc
1493
1494*/

1495
Popular Tags