diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java index a3b5afacb..ff6768f54 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java @@ -755,7 +755,8 @@ public class JDBCConfigurationImpl public Object getConnectionFactory2() { // override to configure data source if (dataSource2 == null) { - DataSource ds = (DataSource) connectionFactory2.get(); + // superclass will lookup from JNDI. + DataSource ds = (DataSource) super.getConnectionFactory2(); if (ds == null) { // the driver name is always required, so if not specified, // then no connection factory 2