Re: Java 1.5 / 1.6 coexistence issues

From: Andrus Adamchik (aadamchi..pache.org)
Date: Mon Sep 29 2008 - 04:40:01 EDT

  • Next message: Laurent Marchal (JIRA): "[jira] Created: (CAY-1112) Fetching from relationships returns TRANSIENT objects."

    Ugh, stupid me, we have Harmony right here at Apache :-) Thanks Tim, I
    will take a look, and ask questions if we can't figure it on our own.

    Thanks,
    Andrus

    On Sep 29, 2008, at 11:28 AM, Tim Ellison wrote:

    > Andrus Adamchik wrote:
    >> We are trying to setup Cayenne ORM project structure to be both
    >> buildable and runnable under Java 1.5 and 1.6. ("buildable" is
    >> important
    >> for non-64-bit Intel Mac users. There's no Java 6 for those older
    >> Macs).
    >>
    >> The problem is that we are implementing a bunch of java[x].sql
    >> interfaces in Cayenne that have changed between the versions of
    >> Java. So
    >> take for instance a class implementing java.sql.ResultSet. To be
    >> able to
    >> compile against 1.6 jars, we need methods like this:
    >>
    >> public java.sql.SQLXML getSQLXML(int) {...}
    >>
    >> Which does not compile against 1.5 jars. So what I am thinking is
    >> building a small "JDBC4-compatibility" Maven module based on
    >> OpenJDK (or
    >> Sun JRE) that contains needed interfaces from java[x].sql packages.
    >> It
    >> will be done outside Apache. Then the plan to make it a Cayenne
    >> "provided" dependency. I.e. it won't be shipped with Cayenne.
    >>
    >> Any licensing considerations with this approach?
    >
    > Just use Apache Harmony's implementations and you will not have any
    > such
    > problems.
    >
    > There is a Java 5 version [1] and Java 6 version [2] available. if
    > you
    > want help with a compile-against JAR come and talk on the dev list.
    >
    > [1]
    > http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/
    > [2]
    > http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/
    >
    > Regards,
    > Tim
    >
    > ---------------------------------------------------------------------
    > DISCLAIMER: Discussions on this list are informational and educational
    > only. Statements made on this list are not privileged, do not
    > constitute legal advice, and do not necessarily reflect the opinions
    > and policies of the ASF. See <http://www.apache.org/licenses/> for
    > official ASF policies and documents.
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: legal-discuss-unsubscrib..pache.org
    > For additional commands, e-mail: legal-discuss-hel..pache.org
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Sep 29 2008 - 04:40:39 EDT