[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2933) externalize automatic resolution of Dialect (Tomoto Shimizu Washio)

Tomoto Shimizu Washio (JIRA) noreply at atlassian.com
Mon Oct 13 04:07:05 EDT 2008


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tomoto Shimizu Washio updated HHH-2933:
---------------------------------------

    Attachment: test.patch
                SettingFactory.patch

Hi, thank you for brushing up the design and code.  My feedback is as follows.  The first one would be significant, but others are just my suggestions and opinions.

(1) In SettingsFactory, I suppose you need to add an extra determination code for the cases that the metadata is unavailable (useJdbcMetadata is false, user supplied JDBCConnection, etc.)  In the current code, determineDialect would never be invoked in those cases and the dialect would become null although the application might have explicitly specified the dialect class in the configuration.  I suppose SuppliedConnectionTest should fail because of this.  The fix should be like SettingsFactory.patch (this is an additional patch over your code).  I admit that the intention was not clear in my first code, so this time I added a private method determineDialectWithoutConnection.

(2) If you think it makes sense, please add test cases shown in test.patch.  This would improve the coverage on the new code (converting JDBCConnectionException, BasicDialectResolver, etc.).

(3) Is it ok that org.hibernate.dialect and org.hibernate.dialect.resolver forms a cyclic package dependency?  If you don't mind, it is ok.  I just wanted to make sure it would not violate any design rules if you had any.

> externalize automatic resolution of Dialect (Tomoto Shimizu Washio)
> -------------------------------------------------------------------
>
>                 Key: HHH-2933
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2933
>             Project: Hibernate Core
>          Issue Type: Patch
>          Components: core
>    Affects Versions: 3.2.5
>            Reporter: Mikael Kopteff
>            Assignee: Steve Ebersole
>             Fix For: 3.2.x, 3.3.x, 3.4
>
>         Attachments: dialect_registration.zip, dialect_registration_rev2.zip, HHH-2293-DialectResolver-svn.patch, SettingFactory.patch, test.patch
>
>
> Introducing DialectResolver!
> Much better approach to resolving JDBC Connection information to Dialect allowing users to define custom behavior

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list