Re: replication management via jdbc

Ronald Klop <[email protected]> Fri, 21 May 2010 11:34:15 +0200 (CEST)
Newsgroups gmane.comp.db.mysql.java
Message-ID <7569128.4.1274434455149.JavaMail.tomcat@localhost>
------=_Part_3_4086146.1274434455075
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

It isn't that hard.

        Statement stat = conn.createStatement();
        try {
            ResultSet rs = stat.executeQuery("SHOW MASTER STATUS");
            if (!rs.next()) {
                throw new RuntimeException("Unexpected empty resultset.");
            }
            String file = rs.getString("File");
            long position = rs.getLong("Position"));
        } finally {
            conn.close();
        }



Op donderdag, 20 mei 2010 20:26 schreef "Parker, David" <[email protected]>:
> 
>  
> 
> I'd be interested to hear if anybody has used Java to maintain their replication state. I'm mainly wondering if there are any jdbc extensions for things like SHOW MASTER, etc.
> 
> Thanks!
> 
> -- DAP
> --------------------------------------------------------------------------------------------------------------------------
> 
> 
> 
> 
> 


------=_Part_3_4086146.1274434455075--