You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2013/01/02 06:22:12 UTC

[jira] [Updated] (DERBY-5955) Prepare Derby to run with Compact Profiles (JEP 161)

     [ https://issues.apache.org/jira/browse/DERBY-5955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-5955:
---------------------------------

    Attachment: derby-5955-client-restructure-01.stat
                derby-5955-client-restructure-01.diff

Uploading patch derby-5955-client-restructure-01. This patch restructures the data source hierarchy of the client driver with the same aim as for the embedded driver; to prepare for data sources that are not dependent on JNDI.

Patch details:

A   ClientDataSourceInterface
A   ClientConnectionPoolDataSourceInterface
A   ClientXADataSourceInterface

The patch adds three new interfaces allowing the common parts of the data sources to be declared there.

M       java/client/org/apache/derby/jdbc/ClientBaseDataSource.java

The base implementation, ClientBaseDataSource is analogous to EmbeddedBaseDataSource. It no longer implements Referenceable, that is moved to ClientDataSource.  The basic getConnection method is hoisted up into ClientBaseDataSource, as are minion methods for pooled connections and XA connections. Constants are moved to ClientDataSourceInterface. Both the latter changes makes those resources available to new data sources (not yet introduced in this patch) not inheriting ClientDataSource; with its JNDI dependence.

M       java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
M       java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl40.java
M       java/client/org/apache/derby/client/ClientXAConnection.java
M       java/client/org/apache/derby/client/ClientXAConnection40.java
M       java/client/org/apache/derby/client/am/Configuration.java
M       java/client/org/apache/derby/client/am/Connection.java
M       java/client/org/apache/derby/jdbc/ClientDriver.java

Smaller changes to accomodate the new hierarchy.

M       java/client/org/apache/derby/client/am/LogWriter.java

Smaller changes to accomodate the new hierarchy plus LogWriter#getAttributes it no longer uses Reference#getAll to get at the data source's attributes, but now uses bean inspection to avoid presuming the data source has implements Referenceable. 

M       java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource.java

Now uses the minion connection methods and implements the new ClientConnectionPoolDataSourceInterface.

M       java/client/org/apache/derby/jdbc/ClientConnectionPoolDataSource40.java
M       java/client/org/apache/derby/jdbc/ClientDataSource40.java
M       java/client/org/apache/derby/jdbc/ClientXADataSource40.java

These now implement javax.sql.*DataSource to get compile-time check that they actually implement the 4.1 extensions; added a missing explicit serialVersionUID chosen to be the old default value (otherwise serialization would break with the new hierachy changes).

M       java/client/org/apache/derby/jdbc/ClientDataSource.java

Now implements Referenceable itself instead of through ClientBaseDataSource.
Now inherits basic connection methods from ClientBaseDataSource instead of implementing them itself.

M       java/client/org/apache/derby/jdbc/ClientXADataSource.java

Now implements ClientXADataSourceInterface; hoisted its connection logic up to ClientBaseDataSource.

M       tools/jar/dnc.properties
M       java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java
M       java/client/org/apache/derby/client/net/NetConnection.java
M       java/client/org/apache/derby/client/net/NetConnection40.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java
M       java/testing/org/apache/derbyTesting/junit/J2EEDataSource.java

Trivial changes

Running regressions, please review.

                
> Prepare Derby to run with Compact Profiles (JEP 161)
> ----------------------------------------------------
>
>                 Key: DERBY-5955
>                 URL: https://issues.apache.org/jira/browse/DERBY-5955
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation, JDBC, Services, SQL
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>         Attachments: apidiff.zip, client-graph.png, derby-5955-client-restructure-01.diff, derby-5955-client-restructure-01.stat, derby-5955-embed-restructure-01.diff, derby-5955-embed-restructure-01.stat, derby-5955-embed-restructure-02.diff, derby-5955-embed-restructure-02.stat, derby-5955-embed-restructure-03.diff, derby-5955-embed-restructure-03.stat, derby-5955-embed-restructure-04.diff, derby-5955-embed-restructure-04.stat, derby-5955-embed-restructure-followup.diff, derby-5955-embed-restructure-followup.stat, derby-5955-proof-of-concept-2.diff, derby-5955-proof-of-concept-2.stat, derby-5955-proof-of-concept.diff, derby-5955-proof-of-concept.stat, derby-5955-ser.zip, embedded-graph.png, old-client-graph.png, old-embedded-graph.png, publishedapi.zip, publishedapi.zip
>
>
> While waiting for a Java module system (aka project Jigsaw), it has been decided to define a few subsets of the Java SE Platform Specification, cf JEP 161 ( http://openjdk.java.net/jeps/161).
> A quote from the JEP: "More broadly, this feature is intended to enable the migration of applications currently built on top of the Java ME Connected Device Configuration (CDC) to appropriate Profiles of the Java SE Platform, part of the long-term effort to converge CDC with Java SE."
> It would be good if we make Derby to run on such limited profiles. The current proposal places JDBC in Compact Profile 2 (cf. link above), while other libraries used by Derby, e.g. javax.naming (JNDI) are in Profile 3 (larger).
> It would be good if Derby could run on the smallest posible platform, i.e. Profile 2, but that will probably involve some changes to make Derby gracefully limit functionality when some libraries are missing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira