|
This patch has passed TCK with Derby
Catalina Although Catalina's patch passed the TCK, there were a couple of "extra contributions" that probably shouldn't have been part of the patch. Catalina will re-work the patch and re-post shortly. Thanks for your patience!
changes are mostly in "private" to "protected".
Attaching updated patch. I committed the changes to PreparedStatementImpl earlier this week. This patch contains the rest of the changes Catalina proposed.
Allow vendor "extended" DB Dictionaray plugins.
For example, public Class MyDB2Dictionary extends org.apache.openjpa.jdbc.sql.DB2Dictionary { ...} By changing default plugin values by : JDBCConfigurationImpl.dbdictionaryPlugin.setAlias("db2", "test.MyDB2Dictionary") will instantiate test.MyDB2Dictionary The last change regarding DBDictionaries looks like it's a good start, but I have a few questions / issues.
The changes seem to be intended to enable other vendors to repackage OpenJPA with their own set of DBDictionaries. This is a good thing, but the code only allows DB2, Oracle and SQLServer to be extended. This should be expanded and generalized to allow any DBDictionary to be overridden. The fix also requires the user to get a configuration object and cast it to our implementation class. This should be changed to use the JDBCConfiguration interface. If this is intended for use by other vendors, why don't we just provide the ability for the DBDictionaryFactory class to be extended? If the DBDictionaryFactory class was configurable (like SQLFactory for example), then vendors could prefer their own set of classes without messing around with JDBCConfigurationImpl. Agreed. Additionally, it is already trivial for vendors to repackage OpenJPA with different dbdictionaries. All you need to do is create a ProductDerivation that changes the aliases listed in the JDBCConfigurationImpl.dbdictionaryPlugin.
See JDBCPersistenceProductDerivation for an example of a product derivation that changes alias settings. use dbdictionaryPlugin value to load vendor specific DBDictionary.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Catalina