Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Fail Over / Round Robin

From: Alan Williamson <alan(at)blog-city.com>
Date: Mon Aug 06 2007 - 11:14:50 EDT


Thanks Mark, appreciate that.

Mark Matthews wrote:

>>> Fantastic Ronald ... just what i was looking for.
>>>
>> Alan,
>>
>> Connector/J has had simiar functionality built-in for some time now, if
>> you don't want as many "moving" pieces in your setup. Basically, you
>> specify your master, and slaves, and tell C/J when you want to use one or
>> the other by calling Connection.setReadOnly(boolean) "false" for write (or
>> read) to/from the master, and "true" for read-only from one of the slaves.
>>
>> See
>> 
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-replication-connection.html
>> for more info.
>>
>>   -Mark

>
> Alan,
>
> I just noticed that you're only wanting to read from slaves. In that case,
> you can just use a the "standard" com.mysql.jdbc.Driver for your
> connections, with "roundRobinLoadBalance=true", and each new physical
> connection that is made to the given JDBC URL will use the "next" host in
> the round-robin list.
>
-- 
MySQL Java Mailing List
For list archives: 
http://lists.mysql.com/java
To unsubscribe:    
http://lists.mysql.com/java?unsub=lists@pantek.com
Received on Mon Aug 6 11:15:43 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 09 2007 - 19:30:24 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library