<?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"
	>
<channel>
	<title>Comments on: Load balancing across MySQL servers using JDBC</title>
	<atom:link href="http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc/feed" rel="self" type="application/rss+xml" />
	<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc</link>
	<description>Anecdotes on Java, Ruby, Sysadmin, SEO, Design, and Management</description>
	<pubDate>Thu, 28 Aug 2008 18:27:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Todd Huss</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-4821</link>
		<dc:creator>Todd Huss</dc:creator>
		<pubDate>Sun, 13 Aug 2006 20:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-4821</guid>
		<description>Hi Andy, last time I checked the Spring source code, they had changed it so that it doesn't call conn.setReadOnly so I do it myself in my own Spring interceptor. The best way to be sure is to try it yourself with some real code though and see.</description>
		<content:encoded><![CDATA[<p>Hi Andy, last time I checked the Spring source code, they had changed it so that it doesn&#8217;t call conn.setReadOnly so I do it myself in my own Spring interceptor. The best way to be sure is to try it yourself with some real code though and see.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-4411</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Sun, 06 Aug 2006 12:58:23 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-4411</guid>
		<description>hi,
i am using the Spring transaction framework. this should set readOnly(true) automatically?

i am right ?</description>
		<content:encoded><![CDATA[<p>hi,<br />
i am using the Spring transaction framework. this should set readOnly(true) automatically?</p>
<p>i am right ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Todd Huss</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-1131</link>
		<dc:creator>Todd Huss</dc:creator>
		<pubDate>Wed, 31 May 2006 16:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-1131</guid>
		<description>Hibernate will not do it for you so the latter is what you need to do, however, I would abstract all of the transaction management and setting readonly of the connection out as an interceptor.</description>
		<content:encoded><![CDATA[<p>Hibernate will not do it for you so the latter is what you need to do, however, I would abstract all of the transaction management and setting readonly of the connection out as an interceptor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack Gorden</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-1129</link>
		<dc:creator>Jack Gorden</dc:creator>
		<pubDate>Wed, 31 May 2006 12:47:45 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-1129</guid>
		<description>One question regarding Hibernate ... does it do the required con.setReadOnly calls behind the scenes or did you use the raw connection?

@@ Read/Write @@

factory.getCurrentSession().beginTransaction();

// Do some work
factory.getCurrentSession().save(...);

factory.getCurrentSession().getTransaction().commit();

Or:

boolean readOnly = factory.getCurrentSession().connection().getReadOnly();
factory.getCurrentSession().connection().setReadOnly(false);
factory.getCurrentSession().beginTransaction();

// Do some work
factory.getCurrentSession().save(...);

factory.getCurrentSession().getTransaction().commit();
factory.getCurrentSession().connection().setReadOnly(readOnly);

@@ Read-Only @@

factory.getCurrentSession().beginTransaction();

// Do some work

factory.getCurrentSession().getTransaction().commit();

Or:

boolean readOnly = factory.getCurrentSession().connection().getReadOnly();
factory.getCurrentSession().connection().setReadOnly(true);
factory.getCurrentSession().beginTransaction();

// Do some work

factory.getCurrentSession().getTransaction().commit();
factory.getCurrentSession().connection().setReadOnly(readOnly);</description>
		<content:encoded><![CDATA[<p>One question regarding Hibernate &#8230; does it do the required con.setReadOnly calls behind the scenes or did you use the raw connection?</p>
<p>@@ Read/Write @@</p>
<p>factory.getCurrentSession().beginTransaction();</p>
<p>// Do some work<br />
factory.getCurrentSession().save(&#8230;);</p>
<p>factory.getCurrentSession().getTransaction().commit();</p>
<p>Or:</p>
<p>boolean readOnly = factory.getCurrentSession().connection().getReadOnly();<br />
factory.getCurrentSession().connection().setReadOnly(false);<br />
factory.getCurrentSession().beginTransaction();</p>
<p>// Do some work<br />
factory.getCurrentSession().save(&#8230;);</p>
<p>factory.getCurrentSession().getTransaction().commit();<br />
factory.getCurrentSession().connection().setReadOnly(readOnly);</p>
<p>@@ Read-Only @@</p>
<p>factory.getCurrentSession().beginTransaction();</p>
<p>// Do some work</p>
<p>factory.getCurrentSession().getTransaction().commit();</p>
<p>Or:</p>
<p>boolean readOnly = factory.getCurrentSession().connection().getReadOnly();<br />
factory.getCurrentSession().connection().setReadOnly(true);<br />
factory.getCurrentSession().beginTransaction();</p>
<p>// Do some work</p>
<p>factory.getCurrentSession().getTransaction().commit();<br />
factory.getCurrentSession().connection().setReadOnly(readOnly);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias Bogaert</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-27</link>
		<dc:creator>Mathias Bogaert</dc:creator>
		<pubDate>Thu, 02 Feb 2006 10:17:57 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-27</guid>
		<description>Exactly what I needed. Didn't know this was possible, thanks!</description>
		<content:encoded><![CDATA[<p>Exactly what I needed. Didn&#8217;t know this was possible, thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Matthews</title>
		<link>http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-26</link>
		<dc:creator>Mark Matthews</dc:creator>
		<pubDate>Wed, 01 Feb 2006 17:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://gabrito.com/post/load-balancing-across-mysql-servers-using-jdbc#comment-26</guid>
		<description>Todd,

Let me know how it goes, and if you find any issues that need to be addressed! I'm always glad to see folks try this kind functionality, as I think it's one of the value-add's MySQL's JDBC driver brings.</description>
		<content:encoded><![CDATA[<p>Todd,</p>
<p>Let me know how it goes, and if you find any issues that need to be addressed! I&#8217;m always glad to see folks try this kind functionality, as I think it&#8217;s one of the value-add&#8217;s MySQL&#8217;s JDBC driver brings.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
