<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Automatic reconnect from Hibernate to MySQL</title>
	<atom:link href="http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/</link>
	<description>Adrian Smith's blog</description>
	<lastBuildDate>Thu, 04 Mar 2010 04:38:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tiko</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-8209</link>
		<dc:creator>Tiko</dc:creator>
		<pubDate>Wed, 02 Dec 2009 18:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-8209</guid>
		<description>Thanks  great post, save a lot of my time :)))</description>
		<content:encoded><![CDATA[<p>Thanks  great post, save a lot of my time :)))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kuki</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-6182</link>
		<dc:creator>kuki</dc:creator>
		<pubDate>Mon, 10 Aug 2009 19:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-6182</guid>
		<description>
   org.hibernate.connection.C3P0ConnectionProvider
 thx a lot :D</description>
		<content:encoded><![CDATA[<p>org.hibernate.connection.C3P0ConnectionProvider<br />
 thx a lot :D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-5713</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Fri, 17 Jul 2009 12:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-5713</guid>
		<description>Great help, thanks alot!</description>
		<content:encoded><![CDATA[<p>Great help, thanks alot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jyoti Ranjan Mishra</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-4367</link>
		<dc:creator>Jyoti Ranjan Mishra</dc:creator>
		<pubDate>Mon, 01 Jun 2009 08:33:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-4367</guid>
		<description>Thanks Adrian.

I am facing this problem and found no suitable way to solve.

But yours solution, help me a great.

Thanks Again</description>
		<content:encoded><![CDATA[<p>Thanks Adrian.</p>
<p>I am facing this problem and found no suitable way to solve.</p>
<p>But yours solution, help me a great.</p>
<p>Thanks Again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lavanya</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-4198</link>
		<dc:creator>Lavanya</dc:creator>
		<pubDate>Wed, 27 May 2009 11:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-4198</guid>
		<description>Hai,
Iam also getting the same error.
I configured my hibernate_conf.xml with these parameters:
      org.hibernate.connection.C3P0ConnectionProvider
      100
      1800
      3600

as well as added c3p0-0.9.1.jar.
Then also iam getting same error is coming if i run my application for morethan hours..
Can you please tell me is there anything i have to add to work if without exception.

Thanks in Advance,
Lavanya</description>
		<content:encoded><![CDATA[<p>Hai,<br />
Iam also getting the same error.<br />
I configured my hibernate_conf.xml with these parameters:<br />
      org.hibernate.connection.C3P0ConnectionProvider<br />
      100<br />
      1800<br />
      3600</p>
<p>as well as added c3p0-0.9.1.jar.<br />
Then also iam getting same error is coming if i run my application for morethan hours..<br />
Can you please tell me is there anything i have to add to work if without exception.</p>
<p>Thanks in Advance,<br />
Lavanya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Felix</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-3296</link>
		<dc:creator>Felix</dc:creator>
		<pubDate>Thu, 30 Apr 2009 09:58:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-3296</guid>
		<description>Thank you so much for sharing your insights!

I was confused about whether the property names have to start with &quot;hibernate.&quot; or not.  It seems that if you configure Hibernate using JPA (typically in &quot;persistence.xml&quot;), property names have to include the &quot;hibernate.&quot; prefix. If you use Hibernate&#039;s own configuration mechanism (&quot;hibernate.xml&quot;), you have to omit the prefix.

A lot of sources do not recommend the use of c3p0.testConnectionOnCheckout or c3p0.validate but using c3p0.idle_test_period instead.

Another good and short article about C3P0 configuration:
http://blog.hpxn.net/2009/02/05/using-c3p0-and-hibernate-3/

This configuration seems to work fine in my Hibernate config file:

&lt;property name=&quot;connection.provider_class&quot;&gt;org.hibernate.connection.C3P0ConnectionProvider&lt;/property&gt;
&lt;property name=&quot;c3p0.min_size&quot;&gt;0&lt;/property&gt;
&lt;property name=&quot;c3p0.max_size&quot;&gt;30&lt;/property&gt;
&lt;property name=&quot;c3p0.timeout&quot;&gt;600&lt;/property&gt;
&lt;property name=&quot;c3p0.max_statements&quot;&gt;0&lt;/property&gt;
&lt;property name=&quot;c3p0.acquire_increment&quot;&gt;1&lt;/property&gt;
&lt;property name=&quot;c3p0.idle_test_period&quot;&gt;60&lt;/property&gt;

Additionally, I have set autoReconnect=true in my JDBC URL for MySQL (just to be safe).</description>
		<content:encoded><![CDATA[<p>Thank you so much for sharing your insights!</p>
<p>I was confused about whether the property names have to start with &#8220;hibernate.&#8221; or not.  It seems that if you configure Hibernate using JPA (typically in &#8220;persistence.xml&#8221;), property names have to include the &#8220;hibernate.&#8221; prefix. If you use Hibernate&#8217;s own configuration mechanism (&#8220;hibernate.xml&#8221;), you have to omit the prefix.</p>
<p>A lot of sources do not recommend the use of c3p0.testConnectionOnCheckout or c3p0.validate but using c3p0.idle_test_period instead.</p>
<p>Another good and short article about C3P0 configuration:<br />
<a href="http://blog.hpxn.net/2009/02/05/using-c3p0-and-hibernate-3/" rel="nofollow">http://blog.hpxn.net/2009/02/05/using-c3p0-and-hibernate-3/</a></p>
<p>This configuration seems to work fine in my Hibernate config file:</p>
<p>&lt;property name=&#8221;connection.provider_class&#8221;&gt;org.hibernate.connection.C3P0ConnectionProvider&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.min_size&#8221;&gt;0&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.max_size&#8221;&gt;30&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.timeout&#8221;&gt;600&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.max_statements&#8221;&gt;0&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.acquire_increment&#8221;&gt;1&lt;/property&gt;<br />
&lt;property name=&#8221;c3p0.idle_test_period&#8221;&gt;60&lt;/property&gt;</p>
<p>Additionally, I have set autoReconnect=true in my JDBC URL for MySQL (just to be safe).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-3156</link>
		<dc:creator>Marcin</dc:creator>
		<pubDate>Sun, 26 Apr 2009 19:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-3156</guid>
		<description>We use:
&lt;code&gt;hibernate.c3p0.idle_test_period = 100&lt;/code&gt;
in &lt;i&gt;hibernate.properties&lt;/i&gt;

along with
&lt;code&gt;c3p0.preferredTestQuery = SELECT 1;&lt;/code&gt;
in &lt;i&gt;c3p0.properties&lt;/i&gt; and it works just fine.

Regards,
Marcin</description>
		<content:encoded><![CDATA[<p>We use:<br />
<code>hibernate.c3p0.idle_test_period = 100</code><br />
in <i>hibernate.properties</i></p>
<p>along with<br />
<code>c3p0.preferredTestQuery = SELECT 1;</code><br />
in <i>c3p0.properties</i> and it works just fine.</p>
<p>Regards,<br />
Marcin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-3067</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 24 Apr 2009 14:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-3067</guid>
		<description>Thanks a lot, saves me another afternoon of work! Great work.</description>
		<content:encoded><![CDATA[<p>Thanks a lot, saves me another afternoon of work! Great work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zac Morris</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-2336</link>
		<dc:creator>Zac Morris</dc:creator>
		<pubDate>Tue, 31 Mar 2009 16:30:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-2336</guid>
		<description>Also, it looks like you can configure this directly in the hibernate.cfg.xml file via:

&lt;property name=”c3p0.validate”&gt;true&lt;/property&gt;&lt;!– Validate the connection on checkout –&gt;

Source:
http://www.informit.com/articles/article.aspx?p=353736&amp;seqNum=4</description>
		<content:encoded><![CDATA[<p>Also, it looks like you can configure this directly in the hibernate.cfg.xml file via:</p>
<p>&lt;property name=”c3p0.validate”>true&lt;/property>&lt;!– Validate the connection on checkout –></p>
<p>Source:<br />
<a href="http://www.informit.com/articles/article.aspx?p=353736&amp;seqNum=4" rel="nofollow">http://www.informit.com/articles/article.aspx?p=353736&amp;seqNum=4</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zac Morris</title>
		<link>http://www.databasesandlife.com/automatic-reconnect-from-hibernate-to-mysql/comment-page-1/#comment-2335</link>
		<dc:creator>Zac Morris</dc:creator>
		<pubDate>Tue, 31 Mar 2009 16:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.databasesandlife.com/?p=315#comment-2335</guid>
		<description>Also wanted to add to this dicussion with a great URL that I found that breaks down many of the C3P0 options:

http://www.mchange.com/projects/c3p0/index.html</description>
		<content:encoded><![CDATA[<p>Also wanted to add to this dicussion with a great URL that I found that breaks down many of the C3P0 options:</p>
<p><a href="http://www.mchange.com/projects/c3p0/index.html" rel="nofollow">http://www.mchange.com/projects/c3p0/index.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
