Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool
In directory sc8-pr-cvs1:/tmp/cvs-serv11821
Modified Files:
ProxoolFacade.java
Log Message:
Fixed a bug: the redefine() method was actually calling the update() method. Also, added checks to make the
"Attempt to use a pool with incomplete definition" exception a bit more descriptive. It's often because you
are referring to an unregistered pool simply by using an alias.
Index: ProxoolFacade.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ProxoolFacade.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** ProxoolFacade.java 7 Sep 2003 22:09:21 -0000 1.72
--- ProxoolFacade.java 16 Oct 2003 18:52:35 -0000 1.73
***************
*** 58,61 ****
--- 58,74 ----
*/
public static synchronized String registerConnectionPool(String url, Properties info) throws ProxoolException {
+ return registerConnectionPool(url, info, true);
+ }
+
+ /**
+ * Build a ConnectionPool based on this definition and then start it.
+ * @param url defines the delegate driver and delegate url.
+ * @param info the properties used to configure Proxool (and any for the delegate driver too) - optional
+ * @param explicitRegister set to true if we are registering a new pool explicitly, or false
+ * if it's just because we are serving a url that we haven't come across before
+ * @return the alias for this pool (or the full url if no alias is specified)
+ * @throws ProxoolException if anything goes wrong
+ */
+ protected static synchronized String registerConnectionPool(String url, Properties info, boolean explicitRegister) throws ProxoolException {
String alias = getAlias(url);
***************
*** 72,76 ****
if (!ConnectionPoolManager.getInstance().isPoolExists(alias)) {
! ConnectionPoolDefinition cpd = new ConnectionPoolDefinition(url, info);
registerConnectionPool(cpd);
} else {
--- 85,89 ----
if (!ConnectionPoolManager.getInstance().isPoolExists(alias)) {
! ConnectionPoolDefinition cpd = new ConnectionPoolDefinition(url, info, explicitRegister);
registerConnectionPool(cpd);
} else {
***************
*** 493,497 ****
/**
! * Redfine the behaviour of the pool. All existing properties (for Proxool
* and the delegate driver are reset to their default) and reapplied
* based on the parameters sent here.
--- 506,510 ----
/**
! * Redefine the behaviour of the pool. All existing properties (for Proxool
* and the delegate driver are reset to their default) and reapplied
* based on the parameters sent here.
***************
*** 505,509 ****
ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias);
ConnectionPoolDefinition cpd = cp.getDefinition();
! cpd.update(url, info);
}
--- 518,522 ----
ConnectionPool cp = ConnectionPoolManager.getInstance().getConnectionPool(alias);
ConnectionPoolDefinition cpd = cp.getDefinition();
! cpd.redefine(url, info);
}
***************
*** 691,694 ****
--- 704,712 ----
Revision history:
$Log$
+ Revision 1.73 2003/10/16 18:52:35 billhorsman
+ Fixed a bug: the redefine() method was actually calling the update() method. Also, added checks to make the
+ "Attempt to use a pool with incomplete definition" exception a bit more descriptive. It's often because you
+ are referring to an unregistered pool simply by using an alias.
+
Revision 1.72 2003/09/07 22:09:21 billhorsman
Remove any registered ShutdownHooks during shutdown.
|