Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor IscDbHandle descendants [JDBC206] #255

Closed
firebird-automations opened this issue Dec 13, 2011 · 8 comments
Closed

Refactor IscDbHandle descendants [JDBC206] #255

firebird-automations opened this issue Dec 13, 2011 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Both the JNI and pure-java implementation of IscDbHandle share a lot of similar or same code. Pull the implementation of methods up to AbstractIscDbHandle.

Also a lot of the methods defined in AbstractIscDbHandle and in both isc_db_handle_impl variants are used by casting a IscDbHandle to AbstractIscDbHandle (or even isc_db_handle_impl) for example in GDSHelper and FBManagedConnection (and Factory + MetaData). This indicates that they should be defined in IscDbHandle instead.

Commits: 6d04361 53f985c 2d7bcb5 e602f0a

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

assignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Moved common methods to AbstractIscDbHandle, and added methods commonly used by casting down from IscDbHandle to AbstractIscDbHandle or lower to the IscDbHandle interface definition. As code in isc_db_handle_impl is in LGPL, I changed the license of AbstractIscDbHandle to LGPL. This is no problem as the 'interface' that was under BSD in AbstractIscDbHandle is now part of IscDbHandle (which is BSD).

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Removed a number of casts that are no longer necessary. There are some more places where these could be removed, but as these involve the JNI and pure-java implementation, casts to the right isc_db_handle_impl might actually be the right course of action to ensure the right types are used (no mixing of native and pure-java).

This does seem to indicate a bit of additional refactoring work may be required there. I will need to look into that a bit more for later Jaybird versions.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: In Progress [ 3 ] => Open [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 2.2 [ 10053 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants