From derby-dev-return-60454-apmail-db-derby-dev-archive=db.apache.org@db.apache.org Tue Jun 03 13:23:09 2008 Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 83641 invoked from network); 3 Jun 2008 13:23:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 13:23:09 -0000 Received: (qmail 18387 invoked by uid 500); 3 Jun 2008 13:23:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 18356 invoked by uid 500); 3 Jun 2008 13:23:11 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 18343 invoked by uid 99); 3 Jun 2008 13:23:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 06:23:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 13:22:23 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0C198234C12C for ; Tue, 3 Jun 2008 06:22:45 -0700 (PDT) Message-ID: <407311755.1212499365048.JavaMail.jira@brutus> Date: Tue, 3 Jun 2008 06:22:45 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3703) Make it possible to build the JSR169 support with the jdk1.4 libraries In-Reply-To: <1298306616.1212449145198.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601920#action_12601920 ] Knut Anders Hatlen commented on DERBY-3703: ------------------------------------------- If I understand correctly, the problems with compiling both the JSR-169 implementation classes and the JDBC 3.0 implementation classes against the JDK 1.4 libraries are: 1) Both variants need to implement the appropriate java.sql interface, and they need to be non-abstract, but a non-abstract class which implements just the subset in JSR-169 doesn't fulfill the contract of the JDBC 3.0 interfaces (the problem Rick's patch attempts to solve) 2) Some of the JDBC 3.0 methods may reference classes that are not part of JSR-169 and possibly fail to load (the issue Dan raised) Keeping the separation between the JDBC 3.0 classes and the JSR-169 classes seems necessary because of (2). So essentially, we need to find a way to solve (1) without merging the JDBC 3.0 implementation classes and the JSR-169 classes. These classes are the only ones of interest, as far as I can tell: - Driver169 - EmbeddedSimpleDataSource - EmbedResultSet169 - EmbedPreparedStatement169 - EmbedCallableStatement169 Driver169 only implements internal Derby interfaces, so compiling it against the JDK 1.4 libraries shouldn't cause any problems (except reduced compile-time checking of that it doesn't rely on classes/methods not part of Foundation 1.1, but that's no different from the vast majority of the engine code). EmbeddedSimpleDataSource implements java.sql.DataSource, which is identical in JDBC 3.0 and JSR-169, and should therefore not cause any problems. That leaves us with ResultSet, PreparedStatement and CallableStatement. None of these classes contains any code, except a constructor that calls the constructor of the super class. What we could do to make these classes compile, is to let the ant scripts create dummy interfaces that they put in the boot classpath so that the compiler doesn't complain about missing methods. We only need three empty interfaces to make this work: package java.sql; public interface ResultSet {} package java.sql; public interface PreparedStatement {} package java.sql; public interface CallableStatement {} As a refinement, we could perhaps give the PropertySetter ant task some more intelligence so that it set up the JSR-169 classpath with Foundation + JSR-169 if those jars are available, and use the JDK 1.4 classes + dummy JDBC classes if they are not available. If we do that, we could even compile more of the engine against the Foundation libraries if we have them, and in fact get better compile-time checking of larger parts of the code. > Make it possible to build the JSR169 support with the jdk1.4 libraries > ---------------------------------------------------------------------- > > Key: DERBY-3703 > URL: https://issues.apache.org/jira/browse/DERBY-3703 > Project: Derby > Issue Type: Improvement > Components: Build tools > Reporter: Rick Hillegas > Attachments: derby-3703-01-aa-moveJdbc3methods.diff, derby-3703-01-aa-moveJdbc3methods.diff > > > It would be good to simplify the Derby build so that the whole product could be built out-of-the-box just from what's checked into the Derby repository. As a step toward this goal, it would be good to be able to build the jsr169 support without having to download proprietary libraries. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.