commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <>
Subject Re: Connection Pooling in Azure Cloud
Date Sun, 18 Jul 2010 14:46:31 GMT
Praveen Sripati wrote:
> We are in the process of migrating Tomcat and MySQL to Microsoft Azure Cloud
> and facing challenges due to the dynamic nature of the cloud like allocation
> of dynamic ip and ports to the instances of Tomcat & MySQL in Azure. Because
> of this behavior Tomcat needs to
> 1) Dynamically update the ip and ports of the different MySQL instances in
> the JDBC URL (
> Suppose the following is the JDBC URL, then it has to be updated in Tomcat
> at run-time when a new instance of MySQL is bought up or an instance of
> MySQL is bought down.
> url=jdbc:mysql:replication://,,,
> 2) We are using DBCP ( for connection
> pooling. Similarly when a new instance of MySQL is bought up or an instance
> of MySQL is bought down the pool has to be updated dynamically accordingly
> at run-time.
Per comments on similar thread on tomcat-user, if the requirement is
to somehow kill and reestablish the pool dynamically, that is not a
good idea.  You can't kill and force re-establishment of active
connections without either coding applications to work around this
infrastructure "feature" or waiting for all active requests to
complete before doing it.  If on the other hand the driver can
handle all of this transparently to the client (in this case, DBCP),
then there is nothing to do on the DBCP config side other than to
specify the right URL string. If you need to dynamically update the
connection URL of the connection factory used by DBCP, that is not
currently supported by any of the connection factories provided by
DBCP.  You would have to create a custom connection factory to
support this and I assume also to somehow detect the need to do it.

> Has anyone come across a solution for these problems while deploying Tomcat
> and MySQL in Cloud?
> Thanks,
> Praveen

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message