Modified:
branches/branch_5_0/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java
Log:
Added support for Connector/MXJ integration via url subprotocol
"jdbc:mysql:mxj://....".
Modified: branches/branch_5_0/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java
===================================================================
--- branches/branch_5_0/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java 2005-10-25 15:45:26 UTC (rev 4447)
+++ branches/branch_5_0/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java 2005-10-25 15:46:12 UTC (rev 4448)
@@ -440,11 +440,21 @@
return null;
}
- if (!StringUtils.startsWithIgnoreCase(url, "jdbc:mysql://")) { //$NON-NLS-1$
+ if (!StringUtils.startsWithIgnoreCase(url, "jdbc:mysql://") &&
+ !StringUtils.startsWithIgnoreCase(url, "jdbc:mysql:mxj://")) { //$NON-NLS-1$
return null;
}
+ int beginningOfSlashes = 13;
+
+ if (StringUtils.startsWithIgnoreCase(url, "jdbc:mysql:mxj://")) {
+ beginningOfSlashes = 17;
+
+ urlProps.setProperty("socketFactory",
+ "com.mysql.management.driverlaunched.ServerLauncherSocketFactory");
+ }
+
/*
* Parse parameters after the ? in the URL and remove them from the
* original URL.
@@ -487,7 +497,7 @@
}
}
- url = url.substring(13);
+ url = url.substring(beginningOfSlashes);
String hostStuff = null;
| Thread |
|---|
| • Connector/J commit: r4448 - branches/branch_5_0/connector-j/src/com/mysql/jdbc | mmatthews | 25 Oct |