Re: Connection Pooling in Azure Cloud

2010-07-19 Thread Praveen Sripati
Hi Phil,

Thanks for the reply.

This is a problem that will get repeated again and again in the cloud due to
the dynamic nature of the cloud. Servers gets added and removed all the time
in the cloud. I am not sure if a change in DBCP or Driver is the right
approach, but it's a nice to have feature.

Some of the Clouds like Amazon Web Services have Sticky Address (the IP
address of the server can be controlled) using which the problem can be
contained to some extent, but still Tomcat somehow needs to be aware of the
change in the Topology (scaling up/down) of the Database.

Regards,
Praveen

On Sun, Jul 18, 2010 at 8:16 PM, Phil Steitz phil.ste...@gmail.com wrote:

 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 (
 
 http://dev.mysql.com/doc/refman/5.5/en/connector-j-reference-replication-connection.html
 ).
  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://127.0.0.1:5104,127.0.0.1:5108,
 127.0.0.1:5112,
  127.0.0.1:5116,127.0.0.1:5116/itops
 
  2) We are using DBCP (http://commons.apache.org/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.

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


 -
 To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
 For additional commands, e-mail: user-h...@commons.apache.org




-- 
Praveen


Re: Connection Pooling in Azure Cloud

2010-07-19 Thread Ted Dunning
Distributed applications need a good coordination layer.

Apache Zookeeper provides a very nice implementation for this.

On Mon, Jul 19, 2010 at 8:15 AM, Praveen Sripati
praveensrip...@gmail.comwrote:

 Servers gets added and removed all the time
 in the cloud. I am not sure if a change in DBCP or Driver is the right
 approach, but it's a nice to have feature.



Re: [exec]

2010-07-19 Thread Siegfried Goeschl

Hi Venkat,

ad 1) please note that Windows does not kill the children of a parent 
process, e.g. you start a batch file which starts another long-running 
application than killing the batch process will not kill the 
long-running child process.


ad 2) I think ver is a built-in command of the windows command 
interpreter - check out the regression tests suite.


Cheers,

Siegfried Goeschl

On 15.07.10 12:58, venkateswara kumar myla wrote:

Hi Team,
I am very excited with this project and good to have this.
It made my life easy.
I have some questions which are as follows:
1. Watch Dog:
 When i attach a watch dog to a process with some time limit, the process
is executing even the time limit reached.
2. I am unable to execute the dos commands.
 For example i want to execute the ver command in windows 2003.
 I tried to execute the command as follows:
 1. CommandLine cl = new CommandLine(ver);
 DefaultExecutor dfe = new DefaultExecutor();
 dfe.execute(cl);
 2. CommandLine cl = new CommandLine(CMD /C ver);
 DefaultExecutor dfe = new DefaultExecutor();
 dfe.execute(cl);

The command did not get executed.

Could any one please let me know what i am doing wrong here?

Best Regards
Venkat Myla



-
To unsubscribe, e-mail: user-unsubscr...@commons.apache.org
For additional commands, e-mail: user-h...@commons.apache.org