wu-sheng commented on a change in pull request #770: Decouple JDBCURL parser
logic from URLParser question
URL:
https://github.com/apache/incubator-skywalking/pull/770#discussion_r170424711
##########
File path:
apm-sniffer/apm-sdk-plugin/jdbc-commons/src/main/java/org/apache/skywalking/apm/plugin/jdbc/connectionurl/parser/URLParser.java
##########
@@ -29,22 +33,36 @@
*/
public class URLParser {
- private static final String MYSQL_JDBC_URL_PREFIX = "jdbc:mysql";
- private static final String ORACLE_JDBC_URL_PREFIX = "jdbc:oracle";
- private static final String H2_JDBC_URL_PREFIX = "jdbc:h2";
- private static final String POSTGRESQL_JDBC_URL_PREFIX = "jdbc:postgresql";
+ private static ServiceLoader<ConnectionURLParser> JDBCPARSERS
+ = ServiceLoader.load(ConnectionURLParser.class, URLParser.class
+ .getClassLoader());
Review comment:
@ascrutae For safe, please run auto tests ( at least DB, Spring and Tomcat
related ) to make sure this pr would break the whole database plugin system.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services