0

我注意到如果我使用我会得到相同的结果

    RowSetFactory rowSetFactory = RowSetProvider.newFactory();

    rowSetFactory = new RowSetFactoryImpl();

newFactory方法实现:

public static RowSetFactory newFactory()
            throws SQLException {
        // Use the system property first
        RowSetFactory factory = null;
        String factoryClassName = null;
        try {
            trace("Checking for Rowset System Property...");
            factoryClassName = getSystemProperty(ROWSET_FACTORY_NAME);
            if (factoryClassName != null) {
                trace("Found system property, value=" + factoryClassName);
                factory = (RowSetFactory) getFactoryClass(factoryClassName, null, true).newInstance();
            }
        } catch (ClassNotFoundException e) {
            throw new SQLException(
                    "RowSetFactory: " + factoryClassName + " not found", e);
        } catch (Exception e) {
            throw new SQLException(
                    "RowSetFactory: " + factoryClassName + " could not be instantiated: " + e,
                    e);
        }

在这里,我们看到此方法返回RowSetFactorysystem.property 中的哪个设置。

更改此系统属性的原因是什么?

谁默认设置此属性?

4

0 回答 0