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 "Aaron Digulla (JIRA)" <ji...@apache.org> on 2007/11/26 14:22:43 UTC
[jira] Created: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Remove final from all getConnection() methods in EmbeddedDataSource
-------------------------------------------------------------------
Key: DERBY-3227
URL: https://issues.apache.org/jira/browse/DERBY-3227
Project: Derby
Issue Type: Improvement
Components: JDBC
Affects Versions: 10.3.1.4
Reporter: Aaron Digulla
Priority: Minor
The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
The network ClientDataSource doesn't use final, either.
Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3227) Remove final from all
getConnection() methods in EmbeddedDataSource
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588290#action_12588290 ]
Dyre Tjeldvoll commented on DERBY-3227:
---------------------------------------
Merged to 10.4 in revision 647475.
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll updated DERBY-3227:
----------------------------------
Attachment: derby-3227.diff
I have attached a patch which implements Aaron's suggestion. We can always debate whether it is the "the right thing to do" but as long as other jdbc drivers (including our own ClientDriver) allow this, I think it is reasonable for EmbeddedDataSource to do so as well.
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-3227:
--------------------------------------
Fix Version/s: 10.5.0.0
10.4.1.2
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
> Fix For: 10.4.1.2, 10.5.0.0
>
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll updated DERBY-3227:
----------------------------------
Derby Info: (was: [Patch Available])
Committed revision 647425.
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3227) Remove final from all
getConnection() methods in EmbeddedDataSource
Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545460 ]
Knut Anders Hatlen commented on DERBY-3227:
-------------------------------------------
I'm not sure it's a good idea to let applications rely on the ability to extend Derby's classes and override their methods. Would it be possible to work around this issue by writing a custom DataSource class that contains a reference to an EmbeddedDataSource to which it forwards all method calls?
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kristian Waagan closed DERBY-3227.
----------------------------------
Assignee: Dyre Tjeldvoll
I'm taking the liberty to close this issue, since it's been around 11 months since the last activity and issue seems to be fixed.
The reporter should reopen the issue if the problem is still present.
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Assignee: Dyre Tjeldvoll
> Priority: Minor
> Fix For: 10.4.1.3, 10.5.0.0
>
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (DERBY-3227) Remove final from all getConnection()
methods in EmbeddedDataSource
Posted by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dyre Tjeldvoll resolved DERBY-3227.
-----------------------------------
Resolution: Fixed
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
> Attachments: derby-3227.diff
>
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (DERBY-3227) Remove final from all
getConnection() methods in EmbeddedDataSource
Posted by "Aaron Digulla (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DERBY-3227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12545480 ]
Aaron Digulla commented on DERBY-3227:
--------------------------------------
I'm just proposing the most simple solution: Fix the bug at the source. Your proposal is surely possible but:
a) it's on my time,
b) I have to update it every time you change the API,
c) you have no idea about my dependency, so you will make my life miserable by ignorance with every change you make,
d) Not even commercial DB drivers make these methods final. I tried with DB2 (which even obfuscates the code), Oracle and MySQL.
e) these methods are from the javax.sql.DataSource API which means they can't change anyway.
f) All other DataSource implementations in Derby aren't final, either.
g) I can no longer rely on the fact that my DataSource extends EmbeddedDataSource (instanceof will fail).
Okay, I can live without g).
PS: One of the biggest problems in Groovy is that String is final. We had to create our own GString class and we're doing insane stuff to make GString behave like String in every forseeable case (like when you call Java bytecode).
> Remove final from all getConnection() methods in EmbeddedDataSource
> -------------------------------------------------------------------
>
> Key: DERBY-3227
> URL: https://issues.apache.org/jira/browse/DERBY-3227
> Project: Derby
> Issue Type: Improvement
> Components: JDBC
> Affects Versions: 10.3.1.4
> Reporter: Aaron Digulla
> Priority: Minor
>
> The final modifier makes it impossible to wrap Derby connections in P6Spy, for example.
> The network ClientDataSource doesn't use final, either.
> Patch: Replace "public final Connection" with "public Connection" two times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.