DBZ-177 Changes the way the PostgreSQL connector loads the JDBC driver, to use the connector's classloader

This commit is contained in:
Horia Chiorean 2017-01-18 17:59:20 +02:00
parent b0582370a6
commit c024d0789b

View File

@ -31,7 +31,9 @@ public class PostgresConnection extends JdbcConnection {
private static final String URL_PATTERN = "jdbc:postgresql://${" + JdbcConfiguration.HOSTNAME + "}:${"
+ JdbcConfiguration.PORT + "}/${" + JdbcConfiguration.DATABASE + "}";
protected static ConnectionFactory FACTORY = JdbcConnection.patternBasedFactory(URL_PATTERN);
protected static ConnectionFactory FACTORY = JdbcConnection.patternBasedFactory(URL_PATTERN,
org.postgresql.Driver.class.getName(),
PostgresConnection.class.getClassLoader());
private static Logger LOGGER = LoggerFactory.getLogger(PostgresConnection.class);