Skip to content

Commit

Permalink
Merge pull request #7 from 88250/master
Browse files Browse the repository at this point in the history
manager 编译问题修复
  • Loading branch information
hexianmao committed Apr 28, 2014
2 parents d79d8ec + 15913f9 commit 5809987
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/manager/target/
/driver/target/
/server/target/
13 changes: 10 additions & 3 deletions driver/src/main/java/com/alibaba/cobar/jdbc/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,19 @@
import java.util.Properties;

import com.mysql.jdbc.NonRegisteringDriver;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;

/**
* 在使用集群时提供负载均衡的功能,其他情况和MySQLDriver一样。
*
*
* <pre>
* 使用方法:
* Class.forName("com.alibaba.cobar.jdbc.Driver");
* String url = "jdbc:cobar://host:port/dbname?user=xxx&password=xxx";
* ...
* </pre>
*
*
* @author xianmao.hexm 2012-4-27
*/
public class Driver extends NonRegisteringDriver implements java.sql.Driver {
Expand All @@ -51,7 +53,7 @@ public class Driver extends NonRegisteringDriver implements java.sql.Driver {

/**
* Construct a new driver and register it with DriverManager
*
*
* @throws SQLException if a database error occurs.
*/
public Driver() throws SQLException {
Expand All @@ -73,4 +75,9 @@ public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws
return super.getPropertyInfo(UrlProvider.getMySQLUrl(url), info);
}

@Override
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
throw new SQLFeatureNotSupportedException("Not supported yet.");
}

}
1 change: 1 addition & 0 deletions manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.2.3</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>xpp3</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
import java.util.logging.Logger;

import javax.sql.DataSource;

Expand Down Expand Up @@ -72,4 +74,9 @@ public Connection getConnection(String username, String password) throws SQLExce
return null;
}

@Override
public Logger getParentLogger() throws SQLFeatureNotSupportedException {
throw new SQLFeatureNotSupportedException("Not supported yet.");
}

}

0 comments on commit 5809987

Please sign in to comment.