Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6275901

there is no way to get main interfaces implementation in JDBC RowSet API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6
    • core-libs
    • generic
    • generic

      Since Java 5.0 (Tiger) there were introduced JDBC RowSet implementations also known as JSR 114. Now Sun JDK has a number of classes implementing rowset interfaces in com.sun.rowset package. Therefore there are a few problems when the user wants to use this API:
      - Java implementation may have one implementation of XxxRowSet interfaces or no ones at all,
      - if Java has XxxRowSet interfaces implementation the user should look for fully qualified class name. These classes have different names in various Java implementations. For example BEA didn't publish necessary class names but implemented own factory class. See for details http://e-docs.bea.com/wls/docs90/javadocs/weblogic/jdbc/rowset/RowSetFactory.html

      To solve these problems we suggest to introduce Factory class that will have one factory-method for each RowSet interface. For example it may be as following:

      public class RowSetFactory {
        public CashedRowSet createCashedRowSet();
        public FilteredRowSet createFilteredRowSet();
        public JdbcRowSet createJdbcRowSet();
        public JoinRowSet createJoinRowSet();
        public WebRowSet createWebRowSet();
      }

      Factory method will throw UnsupportedOperationException if there is no corresponding interface implementation.

      The advantages we have:
      - WORA (write once run anywhere), the API user can run the code in any Java implementation, not only Sun JDK
      - the API user don't need to read auxilary documentations to get right class name and a way to instantiate it
      ###@###.### 2005-05-25 14:02:14 GMT

            ahandasunw Amit Handa (Inactive)
            ydanilev Yury Danilevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: