[hibernate-dev] Wrong JdbcServicesImpl configuration with problematic connection

Steve Ebersole steve at hibernate.org
Mon Jun 6 08:15:59 EDT 2011


Then please create a test case that illustrates this problematic behavior
and ideally create a pull request fixing said behavior
On Jun 6, 2011 5:01 AM, "Dmitry Geraskov" <dgeraskov at exadel.com> wrote:
> Hey, guys,
>
> I decided to write to this list to force this mistake to be fixed in
Beta1.
>
> There is a widely used class JdbcServicesImpl in hibernate4.
> In the configure(Map configValues) it gets Connection object and does
> the configuration. But what if the connection can't be established? It
> do some steps in case of SQLException. But there are could be other
> reasons of connection problem. For example missing
> Driver(ClassNotFoundException), but this exception isn't handled. Why I
> think it should be handled here?
>
> Look at SchemaExport. It has an option "export" to database. And in case
> this option is set to false we don't need the connection and Driver to
> make it generate schema script successfully. But we still need some
> configuration data from JdbcServices. And actually in hibernate 3 it
> works nice without db connection. I guess it also would work in
> hibernate4 too, but only if connection can't be established because of
> SQLException, but not any other problem.
>
> Dmitry Geraskov
>



More information about the hibernate-dev mailing list