<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&#8220;weekly status&#8221; &#8211; was a wrong header
for the letter.<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&gt; </span>Max, why ConsoleConfiguration -&gt;
localCfg.setProperty( &quot;hibernate.temp.use_jdbc_metadata_defaults&quot;,
&quot;false&quot; ); - is false not a true?<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&gt; </span>Is the reason the same - autoConfigureDialect
is commented:<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&gt; </span>//autoConfigureDialect(localCfg); Disabled
for now since it causes very looong timeouts for non-running databases + i
havent been needed until now...<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&gt; </span>autoConfigureDialect<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='color:#1F497D'>&gt; </span>yes - a non-started
database causes the whole ui to hang.<br>
<span style='color:#1F497D'>&gt; </span>So why GenerateEntitiesWizard -&gt;
performFinish -&gt;
wc.setAttribute(&quot;hibernate.temp.use_jdbc_metadata_defaults&quot;, true);<o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
style='color:#1F497D'>&gt; </span>Do you know some other way &nbsp;- to check
non-running database quickly without getConnection?<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='color:#1F497D'>&gt; </span>look at the datbase
url, driverclass and look at the info in DTP data or if that is not enough ask
the user for the db, <br>
<span style='color:#1F497D'>&gt; </span>It is possible to enhance
SettingsFactory -&gt; buildSettings here:<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in'><span style='font-family:
Wingdings'>è</span><span style='font-size:7.0pt'> </span>if ( useJdbcMetadata )
{<o:p></o:p></p>

</div>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>it
is possible to cache databaseName &amp; databaseMajorVersion to read it only
once&#8230;<o:p></o:p></p>

</div>

</blockquote>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:#1F497D'>&gt;
</span>No, what should it based the cache on ?<span style='color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Firstly I think just simple
properties: databaseName &amp; databaseMajorVersion be suitable&#8230;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>If useJdbcMetadata and databaseName
== null &amp; databaseMajorVersion == null<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Then get connection and
initialize as it is. So it call getConnection only once &#8211; but this is SettingsFactory
&#8211; not suitable solution&#8230;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>It seems like a &#8220;if (
useJdbcMetadata ) {&#8221; block &#8211; not a right place in SettingsFactory -&gt;
buildSettings, seems should be parameters for buildSettings function - databaseName,
databaseMajorVersion. databaseName, databaseMajorVersion &#8211; should be
initialized from other place.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:#1F497D'>In
any case not a subject to discuss - if</span><br>
<span style='color:#1F497D'>&gt; </span>Not a job for hibernate core to keep
track of.<span style='color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Just setAttribute(&quot;hibernate.temp.use_jdbc_metadata_defaults&quot;,
true) or autoConfigureDialect (better if not a job of hibernate core) could be
a nice feature,<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>It prevent user to make one
more configuration step to setup dialect by hands&#8230;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>It&#8217; a pity if not
possible to use &#8220;hibernate.temp.use_jdbc_metadata_defaults&#8221; or autoConfigureDialect
&#8230;<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:#1F497D'>May
be the solution is to get </span><span style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>databaseName &amp; databaseMajorVersion or
in general dialect in independent thread &#8211; only synchronization issue,<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>So Hibernate Console Config could
display it&#8217;s nodes and in case when the user try to expand &#8220;Database&#8221;
(here is a try to connect to db in any case) - db dialect could get its value. But
in case if db dialect doesn&#8217;t get value &#8211; the user should specify
this by hands&#8230; Look like too much &#8220;could&#8221; and &#8220;but&#8221;,
but this is only specific cases &#8211; in general it seems useful and possible
to use (autoConfigureDialect in independent thread). In the bad case we just
get a long running thread.<o:p></o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'>Vitali</span><br>
<br>
<br>
<span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

</div>

</body>

</html>