db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunitha Kambhampati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Updated: (DERBY-1015) Define interface between network server and engine through Java interfaces.
Date Thu, 06 Jul 2006 01:27:30 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1015?page=all ]

Sunitha Kambhampati updated DERBY-1015:

    Attachment: derby1015.diff.txt

I have been looking at derby1015 in context of fixing derby-1227. I am attaching a patch 'derby1015.diff.txt'
and corresponding 'derby1015.stat.txt' for feedback.

-- This patch is a partial fix for the issues mentioned in derby-1015.  Partial since, it
only defines new interface for the PreparedStatement and ParameterMetaData. 

This patch does the following

1) Defines two new interfaces for use in network server. 

EnginePreparedStatement - This will be used to get a consistent interaction between the BrokeredPreparedStatement
and the EmbedPreparedStatement
EngineParameterMetaData - This interface is defined for the ParameterMetaData.

EmbedPreparedStatement implements EnginePreparedStatement
BrokeredPreparedStatement implements EnginePreparedStatement
EmbedParameterSetMetaData implements EngineParameterMetaData

The interface details are as mentioned in the previous comment. 

2) Code changes to make use of the newly defined interfaces in the network server.  

svn stat:
M      java\engine\org\apache\derby\impl\jdbc\EmbedPreparedStatement.java
M      java\engine\org\apache\derby\impl\jdbc\EmbedParameterSetMetaData.java
M      java\engine\org\apache\derby\iapi\jdbc\BrokeredPreparedStatement.java
A      java\engine\org\apache\derby\iapi\jdbc\EngineParameterMetaData.java
A      java\engine\org\apache\derby\iapi\jdbc\EnginePreparedStatement.java
M      java\drda\org\apache\derby\impl\drda\DRDAStatement.java
M      java\drda\org\apache\derby\impl\drda\DRDAConnThread.java

I ran derbyall on linux/ibm142 and tests ran OK.

I looked at the code coverage for the code snippet in derby-1227 and I see that our current
tests already exercise that codepath.  Not sure how best to address testing for this patch.
 I'd appreciate suggestions/feedback.

I tried to run javadoc to verify if all the javadoc comments were ok, but  have not been successful
in getting it to work.   I'll look at my setup again.


> Define interface between network server and engine through Java interfaces.
> ---------------------------------------------------------------------------
>          Key: DERBY-1015
>          URL: http://issues.apache.org/jira/browse/DERBY-1015
>      Project: Derby
>         Type: Improvement

>   Components: JDBC
>     Reporter: Daniel John Debrunner
>     Assignee: Daniel John Debrunner
>      Fix For:
>  Attachments: derby1015.diff.txt, derby1015.stat.txt
> API between the network server and engine is not well defined, leading to inconsistent
& multiple ways of handling the different objects returned, such as reflection, explicit
casting etc. This in turn has lead to bugs such as DERBY-966 . DERBY-1005, and DERBY-1006,
and access to underlying objects by the application that should be hidden.
> Define interfaces, such as EngineConnection, that both EmbedConnection and BrokeredConnection
implement. Thus the network server can rely on the fact that any connection it obtains will
implement EngineConnection, and call the required methods through that interface.
> Most likely will need EngineConnection, EnginePreparedStatement and EngineResultSet..
These interfaces would be internal to derby and not exposed to applications.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message