jdbcrowsetimpl provides a repackaged implementation of the standard OpenJDK JdbcRowSet implementation for applications that need direct access to implementation behavior such as setConnection() without relying on the non-exported com.sun.rowset package.
In Java 7, RowSetFactory was introduced as the preferred way to create JdbcRowSet objects:
However, JdbcRowSet objects created through RowSetFactory do not expose a setConnection() method, which can make connection reuse more difficult in some legacy or compatibility scenarios.
The standard RowSet API does provide setDataSourceName(), which can be used with a configured DataSource to support pooled database connections:
Beginning with OpenJDK 9, the com.sun.rowset package is not exported from the java.sql.rowset module, which prevents direct use of that internal implementation package in modular Java runtimes:
For backward compatibility and continued connection reuse through setConnection(), this project publishes the OpenJDK rowset implementation under the com.nqadmin.rowset package as a Maven artifact.
Version 1.0.4 is based on the OpenJDK java.sql.rowset implementation from the fixed OpenJDK source tag jdk-25.0.1-ga in the openjdk/jdk25u repository:
This project does not track OpenJDK master directly. Future releases should be reviewed against a newer fixed OpenJDK GA tag when appropriate.
The copied/adapted files are:
JdbcRowSetImpl.javaJdbcRowSetResourceBundle.javaRowSetResourceBundle.propertiesRowSetResourceBundle_de.propertiesRowSetResourceBundle_es.propertiesRowSetResourceBundle_fr.propertiesRowSetResourceBundle_it.propertiesRowSetResourceBundle_ja.propertiesRowSetResourceBundle_ko.propertiesRowSetResourceBundle_pt_BR.propertiesRowSetResourceBundle_sv.propertiesRowSetResourceBundle_zh_CN.propertiesRowSetResourceBundle_zh_TW.properties
The OpenJDK source files are adapted for this artifact in the following ways:
- package references are changed from
com.sun.rowsettocom.nqadmin.rowset; - resource bundle lookup is changed to use the
com.nqadmin.rowset.RowSetResourceBundlebase name; - Java 8 compatibility is preserved where current OpenJDK source uses Java 9+ module APIs.
The OpenJDK jdk-25.0.1-ga version of JdbcRowSetResourceBundle uses module-aware resource lookup:
// Load appropriate bundle according to locale
propResBundle = (PropertyResourceBundle) ResourceBundle.getBundle(PATH,
locale, JdbcRowSetResourceBundle.class.getModule());That code is replaced with a Java 8-compatible class-loader lookup:
// Load appropriate bundle according to locale
propResBundle = (PropertyResourceBundle) ResourceBundle.getBundle(PATH,
locale, Thread.currentThread().getContextClassLoader());This allows the code to compile and run in Java 8 environments.
The OpenJDK resource bundle base name:
private static final String PATH = "com.sun.rowset.RowSetResourceBundle";is changed to the repackaged project base name:
private static final String PATH = "com.nqadmin.rowset.RowSetResourceBundle";This uses the dot-style ResourceBundle base-name convention from current OpenJDK source while pointing to the resources included under src/main/resources/com/nqadmin/rowset/.
- Java 8 or later for normal compile/package builds.
- Maven 3.9.2 or later.
- Maven 3.9.16 is recommended and was used for release preparation.
- Java 11 or later is required only when running the optional OWASP Dependency-Check profile.
To build locally:
mvn clean verifyTo run OWASP Dependency-Check:
mvn -Powasp-check verifyTo prepare release artifacts with sources, Javadocs, signatures, and Central Portal publishing support:
mvn -Prelease clean deployBefore using the release profile, configure the required Central Portal and GPG credentials in your Maven settings.xml.
This code is released under the GNU General Public License, version 2, with the Classpath Exception.
- https://spdx.org/licenses/GPL-2.0-with-classpath-exception.html
- https://github.com/openjdk/jdk25u/blob/jdk-25.0.1-ga/LICENSE
See LICENSE.md for the full license text.