Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

when using JNDI, will try to discover the real adapter. #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

patcheng
Copy link

and centralize the special handling of the adapter for Sqlserver so we don't get error when using transaction.

and centralize the special handling of the adapter for Sqlserver so we don't get error when using transaction.
…nt which cannot be casted as a OracleStatement.

Need to unwrap it first.
DataMapper expects Sqlite adapter, but DataObject expects Sqlite3.

There is code in dm-sqlite-adapter to change the adapter from sqlite to sqlite3, and the dm-do-adapter to create URI using adapter instead of scheme….

but that breaks JNDI case, when we want to scheme to stay 'java', but adapter to be whatever the underlying adapter is.

consolidated more of the logic that maps DM constants to DO constants

and changing DriverDefinition's verifyScheme to check for both scheme and jdbcScheme (in the case of 'sqlite' vs. 'sqlite3').
Avoided references to OraclePreparedStatement completely. Apparently there are multiple definition of the class, and it moves around.
@ghost ghost assigned myabc Jun 7, 2012
@myabc
Copy link
Member

myabc commented Jun 7, 2012

@patcheng @mkristian Sorry for only just following up on this patch. The JNDI part looks right.

I'm just trying to understand the Oracle JDBC driver changes. Would it be possible to have that as a separate PR? (wdyt @pietia)

@pietia
Copy link
Member

pietia commented Jun 7, 2012

@myabc +1 for separate patches

@pietia
Copy link
Member

pietia commented Jun 7, 2012

@patcheng your commits are really interesting! Did you check if your version still works with other Oracle drivers?

@mkristian
Copy link
Member

I never saw the second set of patches - should have merged the JNDI commit immediately ;). the DBCP commit is very specific code - tomcat related.

@patcheng
Copy link
Author

patcheng commented Oct 6, 2012

@pietia It should. The problem is with the newer version of Oracle JDBC driver, they changed the package name of the OraclePrepareStatement, so there is no way to have a class file that works with the older and newer version.

That's why I had to do reflection.

@patcheng
Copy link
Author

patcheng commented Oct 6, 2012

@mkristian yeah, I am not happy with the DBCP-specific code either. But when running under Tomcat, I cannot find another way to get to Oracle's PrepareStatement class.

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

Successfully merging this pull request may close these issues.

4 participants