Issue Details (XML | Word | Printable)

Key: DERBY-3525
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Kathey Marsden
Reporter: Knut Anders Hatlen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

Remove unneeded code to get JDBC level in BrokeredConnection and BrokeredStatement classes

Created: 12/Mar/08 11:11 AM   Updated: 04/May/09 06:22 PM
Return to search
Component/s: JDBC
Affects Version/s: 10.5.1.1
Fix Version/s: 10.3.3.0, 10.4.1.3, 10.5.1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works derby-3525_diff.txt 2008-03-12 06:38 PM Kathey Marsden 11 kB
Issue Links:
Reference
 

Resolution Date: 19/Mar/08 05:14 PM


 Description  « Hide
BrokeredConnection has a method called getJDBCLevel() whose only purpose is to provide a value that can be stored in BrokeredStatement.jdbcLevel. This field is only used once, in BrokeredStatement.createDuplicateStatement():

if (jdbcLevel == 2)
newStatement = conn.createStatement(resultSetType, resultSetConcurrency);
else
newStatement = conn.createStatement(resultSetType, resultSetConcurrency,
                    resultSetHoldability);

Since getJDBCLevel() only returns 2 if Java version 1.3 is used, and Derby doesn't support Java 1.3 any more, BrokeredConnection.getJDBCLevel() and BrokeredStatement.jdbcLevel could be removed.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kristian Waagan added a comment - 12/Mar/08 11:30 AM
It is not clear to me why the component includes "Network Client".
If it was not just a click too much, do you mind explaining how this affects the network client?

Knut Anders Hatlen added a comment - 12/Mar/08 11:58 AM
Thanks. Removed network client from components.

Kathey Marsden added a comment - 12/Mar/08 06:04 PM
Should we just get rid of BrokeredConnection30 too?

Kathey Marsden added a comment - 12/Mar/08 06:38 PM
Attached is a patch for getting rid of jdbcLevel. It keeps BrokeredConnection30 for now.

I ran the xa tests. I'll run the full suite.

V.Narayanan added a comment - 13/Mar/08 03:43 AM
I think it would be OK to move BrokeredConnection30 to the base class
BrokeredConnection since support for java 1.3 is not there anymore. But
I guess this change will cascade down to other 30 classes too which I
think would be out of scope for this issue and should maybe done in another
JIRA.

For now I think the patch attached to get rid of jdbcLevel should suffice.

Knut Anders Hatlen added a comment - 13/Mar/08 07:54 AM
derby-3525_diff.txt looks good. +1 to commit.

I agree that BrokeredConnection30 should also be removed. Probably OK to do it as part of this issue. (Actually, I think most of the *30 classes could be removed now, but that's outside the scope of this issue.)

Kathey Marsden added a comment - 19/Mar/08 05:14 PM
Merged to 10.4 and 10.3, marking this issue resolved.