<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-8662705757379383704.post2679552604349003229..comments</id><updated>2011-11-18T07:18:05.560+10:00</updated><category term='barcamp'/><category term='datasource'/><category term='portlets'/><category term='quartz'/><category term='hillclimb'/><category term='jsr186'/><category term='javascript'/><category term='shareyourlove'/><category term='google appengine'/><category term='ozvr4'/><category term='Mistubisihi'/><category term='osdc'/><category term='willowbank'/><category term='drag racing'/><category term='open source'/><category term='grails plugin'/><category term='grails'/><category term='liferay'/><category term='JDM'/><category term='TDD'/><category term='jsecurity'/><category term='spring'/><category term='EvoOz'/><category term='jetspeed'/><category term='test driven development'/><category term='SSL'/><category term='jasper reports'/><category term='work'/><category term='cars'/><category term='webtest'/><category term='legnum'/><category term='gold coast'/><category term='database'/><category term='grails code example'/><category term='sydney'/><category term='java'/><category term='GT-R'/><category term='galant'/><category term='VR-4'/><category term='web flow'/><category term='1/4 mile'/><category term='samsung'/><category term='australia'/><category term='jquery'/><category term='groovy'/><category term='jsr268'/><category term='functional testing'/><category term='R35'/><category term='Evo'/><category term='gaelyky'/><category term='pluto'/><category term='plugins'/><category term='FTTD'/><category term='webflow'/><category term='dyno'/><category term='google'/><category term='switchable'/><title type='text'>Comments on Cars N Code: Switchable Grails DataSource</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.leebutts.com/feeds/2679552604349003229/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default?start-index=26&amp;max-results=25'/><author><name>Lee Butts</name><uri>https://profiles.google.com/101806026071832831579</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-FF-ENiayYcU/AAAAAAAAAAI/AAAAAAAANzA/gYJ4MzOKZsw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-2442557701997602269</id><published>2011-11-18T07:18:05.560+10:00</published><updated>2011-11-18T07:18:05.560+10:00</updated><title type='text'>Only suggestion I have is to try and debug through...</title><content type='html'>Only suggestion I have is to try and debug through the DBCP code and see where it&amp;#39;s getting too. Maybe there are some bean properties missing/wrong?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/2442557701997602269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/2442557701997602269'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321564685560#c2442557701997602269' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-4001283571786526658</id><published>2011-11-18T07:11:05.097+10:00</published><updated>2011-11-18T07:11:05.097+10:00</updated><title type='text'>Thanks for your reply, Lee. I get the following ex...</title><content type='html'>Thanks for your reply, Lee. I get the following exception after the connection attempt times out:&lt;br /&gt;&lt;br /&gt;org.hibernate.util.JDBCExceptionReporter Cannot get a connection, pool error Timeout waiting for idle object&lt;br /&gt;&lt;br /&gt;Nothing else interesting is logged, even when I turn on debug for all classes. MySQL general logging, interestingly, shows that grails is connecting to the database during startup, but nothing further is logged afterward.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/4001283571786526658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/4001283571786526658'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321564265097#c4001283571786526658' title=''/><author><name>psydrake</name><uri>http://psydrake.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201589970'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-540149951265112880</id><published>2011-11-18T06:00:00.674+10:00</published><updated>2011-11-18T06:00:00.674+10:00</updated><title type='text'>Can&amp;#39;t think of any reason why a pooled data so...</title><content type='html'>Can&amp;#39;t think of any reason why a pooled data source shouldn&amp;#39;t work. What kind of errors are you getting?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/540149951265112880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/540149951265112880'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321560000674#c540149951265112880' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-6165971040581619712</id><published>2011-11-18T02:44:30.277+10:00</published><updated>2011-11-18T02:44:30.277+10:00</updated><title type='text'>Hi Lee - we discovered during load testing that th...</title><content type='html'>Hi Lee - we discovered during load testing that this solution (which does work great otherwise) does not implement database connection pooling. Is there any particular reason why the DriverManagerDataSource must be used instead of a pooling one? &lt;br /&gt;&lt;br /&gt;I substituted BasicDataSource for it in the code (making sure the maxActive, initialSize, etc. properties were read into the bean), but Hibernate is unable to make a connection after Grails starts up. I just wanted to see if there was a compelling reason not to use a pooling datasource before I go too deep into the rabbit hole. Thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6165971040581619712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6165971040581619712'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321548270277#c6165971040581619712' title=''/><author><name>psydrake</name><uri>http://psydrake.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201589970'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-5316266148975844248</id><published>2011-11-14T05:08:12.042+10:00</published><updated>2011-11-14T05:08:12.042+10:00</updated><title type='text'>Hi, 
I don&amp;#39;t have any free time at the moment ...</title><content type='html'>Hi, &lt;br /&gt;I don&amp;#39;t have any free time at the moment to do a plugin, sorry!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5316266148975844248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5316266148975844248'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321211292042#c5316266148975844248' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3206524548775953458</id><published>2011-11-14T03:52:23.450+10:00</published><updated>2011-11-14T03:52:23.450+10:00</updated><title type='text'>We were trying during many days to use grails mult...</title><content type='html'>We were trying during many days to use grails multi tenant plugin in singleTenant mode without success.&lt;br /&gt;We will try your solution.&lt;br /&gt;Is it possible to make it a plugin?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3206524548775953458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3206524548775953458'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1321206743450#c3206524548775953458' title=''/><author><name>alioune</name><uri>http://www.blogger.com/profile/02571354613004975184</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1924878722'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-7530436618845357856</id><published>2011-10-21T04:09:11.307+10:00</published><updated>2011-10-21T04:09:11.307+10:00</updated><title type='text'>Hi Lee - thanks for supplying this great informati...</title><content type='html'>Hi Lee - thanks for supplying this great information. In regard to my previous posts, where it seemed that SwitchableDataSource.determineTargetDataSource() was getting called in an infinite loop, I was mistaken. I was using a couple of remote databases, and while the method is called many times (resulting in my integration tests timing out), it is not infinite, and when I point to local databases, your solution works perfectly. Thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7530436618845357856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7530436618845357856'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1319134151307#c7530436618845357856' title=''/><author><name>psydrake</name><uri>http://psydrake.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201589970'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-6778211316706056931</id><published>2011-10-16T06:16:00.721+10:00</published><updated>2011-10-16T06:16:00.721+10:00</updated><title type='text'>I haven&amp;#39;t used the spring security plugin befo...</title><content type='html'>I haven&amp;#39;t used the spring security plugin before but if it uses the standard grails dataSource bean then it would work. You would need to find the right place in the filter chain to switch the dataSource though. You should be able to use a Filter to do that.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6778211316706056931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6778211316706056931'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318709760721#c6778211316706056931' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-4581954660931162019</id><published>2011-10-16T00:37:43.642+10:00</published><updated>2011-10-16T00:37:43.642+10:00</updated><title type='text'>Hi,

Is it possible to use springsecurity plugin f...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Is it possible to use springsecurity plugin for switching database?&lt;br /&gt;&lt;br /&gt;1. Keep user/authentication/requestmap details in master database. &lt;br /&gt;&lt;br /&gt;2. Login using spring security from database.&lt;br /&gt;&lt;br /&gt;3. Once the login is successful, switch the database based on user.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Kishore</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/4581954660931162019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/4581954660931162019'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318689463642#c4581954660931162019' title=''/><author><name>kishora y s</name><uri>http://www.blogger.com/profile/00873086804407657726</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-oiaB9oBq5Nw/Tfbt1AtFoNI/AAAAAAAABjE/fWVVy1fx56o/s220/ki.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-85013072'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-9000316370175996798</id><published>2011-10-11T07:04:14.229+10:00</published><updated>2011-10-11T07:04:14.229+10:00</updated><title type='text'>Not an issue that I have seen before sorry,

cheer...</title><content type='html'>Not an issue that I have seen before sorry,&lt;br /&gt;&lt;br /&gt;cheers&lt;br /&gt;&lt;br /&gt;Lee</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/9000316370175996798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/9000316370175996798'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318280654229#c9000316370175996798' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-7778423566348832678</id><published>2011-10-11T06:04:18.171+10:00</published><updated>2011-10-11T06:04:18.171+10:00</updated><title type='text'>Hi Lee, thanks for your response. No, I don&amp;#39;t ...</title><content type='html'>Hi Lee, thanks for your response. No, I don&amp;#39;t get any error - Grails just keeps calling SwitchableDataSource.determineTargetDataSource() every few seconds, and the application just seems to hang. I have fitted your code into our application though, so it is not an exact copy of your demo code. &lt;br /&gt;&lt;br /&gt;However, the fact that Grails seems to be hung up on resources.groovy and doesn&amp;#39;t even run the other application code made me wonder if this was a known issue.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7778423566348832678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7778423566348832678'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318277058171#c7778423566348832678' title=''/><author><name>psydrake</name><uri>http://psydrake.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201589970'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3720291862443220147</id><published>2011-10-11T04:55:31.906+10:00</published><updated>2011-10-11T04:55:31.906+10:00</updated><title type='text'>Is it a StackOverflowError? I havent&amp;#39; seen any...</title><content type='html'>Is it a StackOverflowError? I havent&amp;#39; seen any problem like that before sorry,</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3720291862443220147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3720291862443220147'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318272931906#c3720291862443220147' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3316270823623626558</id><published>2011-10-11T04:28:57.016+10:00</published><updated>2011-10-11T04:28:57.016+10:00</updated><title type='text'>Thanks for this post! Unfortunately, I get what se...</title><content type='html'>Thanks for this post! Unfortunately, I get what seems to be an infinite loop, where Grails keeps calling SwitchableDataSource.determineTargetDataSource() and never moves on.&lt;br /&gt;&lt;br /&gt;If I comment out the following in resources.groovy:&lt;br /&gt;    dataSource(SwitchableDataSource) { &lt;br /&gt;        targetDataSources = dataSources &lt;br /&gt; &lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;Then I don&amp;#39;t see the problem (but then of course the SwitchableDataSource is not used). Have you or anyone here seen this behavior before? Thanks again!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3316270823623626558'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3316270823623626558'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1318271337016#c3316270823623626558' title=''/><author><name>psydrake</name><uri>http://psydrake.myopenid.com/</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/openid16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-201589970'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-5335074670727500399</id><published>2011-09-30T17:56:28.040+10:00</published><updated>2011-09-30T17:56:28.040+10:00</updated><title type='text'>Hi,

are you trying to use a different dialect for...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;are you trying to use a different dialect for each data source?&lt;br /&gt;&lt;br /&gt;That isn&amp;#39;t possible as the Hibernate plugin creates a single session factory and looks up the dialect as it bootstraps. &lt;br /&gt;&lt;br /&gt;You would need to somehow create a new sessionFactory for each dataSource and switch them like we switch the dataSources.&lt;br /&gt;&lt;br /&gt;If you just want to use the oracle dialect then the usual place in DataSource.groovy will still work.&lt;br /&gt;&lt;br /&gt;cheers&lt;br /&gt;&lt;br /&gt;Lee</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5335074670727500399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5335074670727500399'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1317369388040#c5335074670727500399' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3245460217726765486</id><published>2011-09-30T16:00:45.065+10:00</published><updated>2011-09-30T16:00:45.065+10:00</updated><title type='text'>Lee - where in your structure would you add dialec...</title><content type='html'>Lee - where in your structure would you add dialect for the times it is needed; such as:&lt;br /&gt;&lt;br /&gt;dialect = &amp;quot;org.hibernate.dialect.Oracle10gDialect&amp;quot;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3245460217726765486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3245460217726765486'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1317362445065#c3245460217726765486' title=''/><author><name>CosmicRider</name><uri>http://www.blogger.com/profile/15911857660101790032</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1750914547'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-8147355825568806346</id><published>2011-09-20T07:16:52.504+10:00</published><updated>2011-09-20T07:16:52.504+10:00</updated><title type='text'>Sorry Kishore, I&amp;#39;m really busy at the moment. ...</title><content type='html'>Sorry Kishore, I&amp;#39;m really busy at the moment. Someone on the Grails User mailing list or StackOverflow might take a look.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/8147355825568806346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/8147355825568806346'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1316467012504#c8147355825568806346' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3851815876751194379</id><published>2011-09-19T19:46:06.782+10:00</published><updated>2011-09-19T19:46:06.782+10:00</updated><title type='text'>I have uploaded switchable data source project sou...</title><content type='html'>I have uploaded switchable data source project source code [ https://docs.google.com/leaf?id=0B3j9inzR_LLhMzIyYzI3MmEtMjRjMS00Mjc1LTg2Y2YtMTI3NTM3MzA0Nzg0&amp;amp;hl=en_US ] and problem description [ https://docs.google.com/leaf?id=0B3j9inzR_LLhOTNhYTQ0OTYtNGM5Yi00YjIwLThkODMtNjU2YmE3YTk0NWE3&amp;amp;hl=en_US ].&lt;br /&gt;&lt;br /&gt;Can I get help on this?&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Kishore</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3851815876751194379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3851815876751194379'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1316425566782#c3851815876751194379' title=''/><author><name>kishora y s</name><uri>http://www.blogger.com/profile/00873086804407657726</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-oiaB9oBq5Nw/Tfbt1AtFoNI/AAAAAAAABjE/fWVVy1fx56o/s220/ki.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-85013072'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-5153483586459959736</id><published>2011-08-31T20:17:21.743+10:00</published><updated>2011-08-31T20:17:21.743+10:00</updated><title type='text'>Take a look at the documentation for GenericApplic...</title><content type='html'>Take a look at the documentation for GenericApplicationContext. You can call registerBeanDefinition and override the definition for &amp;quot;dataSource&amp;quot;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5153483586459959736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5153483586459959736'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1314785841743#c5153483586459959736' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-2149822860304698764</id><published>2011-08-27T20:44:26.745+10:00</published><updated>2011-08-27T20:44:26.745+10:00</updated><title type='text'>Thanks Lee.
I created controller which implements ...</title><content type='html'>Thanks Lee.&lt;br /&gt;I created controller which implements ApplicationContextAware.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;import org.springframework.context.ApplicationContextAware&lt;br /&gt;import org.springframework.context.ApplicationContext&lt;br /&gt;import org.springframework.beans.BeansException&lt;br /&gt;&lt;br /&gt;class DataSrcController implements ApplicationContextAware {&lt;br /&gt;&lt;br /&gt;    private static ApplicationContext ctx = null;&lt;br /&gt;    public static ApplicationContext getApplicationContext() {&lt;br /&gt;        return ctx;&lt;br /&gt;    }&lt;br /&gt;    public void setApplicationContext(ApplicationContext ctx) throws BeansException {&lt;br /&gt;        // Assign the ApplicationContext into a static method&lt;br /&gt;        this.ctx = ctx;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;But, no idea how to create beans here.Could you please help</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/2149822860304698764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/2149822860304698764'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1314441866745#c2149822860304698764' title=''/><author><name>kishora y s</name><uri>http://www.blogger.com/profile/00873086804407657726</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-oiaB9oBq5Nw/Tfbt1AtFoNI/AAAAAAAABjE/fWVVy1fx56o/s220/ki.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-85013072'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-3469478203315867998</id><published>2011-08-16T22:41:00.678+10:00</published><updated>2011-08-16T22:41:00.678+10:00</updated><title type='text'>Your controller can implement &lt;b&gt;ApplicationContex...</title><content type='html'>Your controller can implement &lt;b&gt;ApplicationContextAware&lt;/b&gt; which will give you access to the Grails ApplicationContext. You should then be able to register a new BeanDefinition for the new datasource. You will need to create the BeanDefinition to match the settings in resources.groovy including getting the correct parent bean definition from the ApplicationContext. The rest of the code should all still work once the new datasource bean definition has been added to the ApplicationContext.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3469478203315867998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/3469478203315867998'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1313498460678#c3469478203315867998' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-6245430884939032016</id><published>2011-08-16T22:23:50.233+10:00</published><updated>2011-08-16T22:23:50.233+10:00</updated><title type='text'>Hi,

I&amp;#39;m currently using this code. It is work...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m currently using this code. It is working perfectly fine. &lt;br /&gt;Now, I need add another functionality to it. Can anyone help me on this?&lt;br /&gt;&lt;br /&gt;The requirement is: &lt;br /&gt;Currently it is possible to create datasources from resources.groovy file (which is one time). Bit, I should be able to add a datasource dynamically from controller call.&lt;br /&gt;&lt;br /&gt;Please share your ideas.&lt;br /&gt;&lt;br /&gt;- kishore</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6245430884939032016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6245430884939032016'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1313497430233#c6245430884939032016' title=''/><author><name>kishora y s</name><uri>http://www.blogger.com/profile/00873086804407657726</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-oiaB9oBq5Nw/Tfbt1AtFoNI/AAAAAAAABjE/fWVVy1fx56o/s220/ki.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-85013072'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-6697418202986061503</id><published>2011-07-11T06:00:47.999+10:00</published><updated>2011-07-11T06:00:47.999+10:00</updated><title type='text'>Hi Rodrigo,

that&amp;#39;s a mistake, the env param i...</title><content type='html'>Hi Rodrigo,&lt;br /&gt;&lt;br /&gt;that&amp;#39;s a mistake, the env param is not actually used. The spring datasource uses the EnvironmentHolder class to lookup the right data source for the current thread.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6697418202986061503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/6697418202986061503'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1310328047999#c6697418202986061503' title=''/><author><name>Lee Butts</name><uri>http://www.blogger.com/profile/16635952306033775166</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_U98FX4sQkXk/SF3kO36P1II/AAAAAAAACwA/rymwmm5mENI/S220/IMG_5435.JPG'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1612027958'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-7626977338590590880</id><published>2011-07-11T02:02:35.410+10:00</published><updated>2011-07-11T02:02:35.410+10:00</updated><title type='text'>Hi, 

why do you have a parameter in the function ...</title><content type='html'>Hi, &lt;br /&gt;&lt;br /&gt;why do you have a parameter in the function getDataSourceForEnv(env) ? &lt;br /&gt;&lt;br /&gt;It is not being used. Shouldnt it be used to cretae a neew Datasource with the environment Data? &lt;br /&gt;&lt;br /&gt;Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7626977338590590880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/7626977338590590880'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1310313755410#c7626977338590590880' title=''/><author><name>Rodrigo</name><uri>http://www.blogger.com/profile/07433121897837017978</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1782743913'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-1014711731805661939</id><published>2011-07-11T02:00:58.846+10:00</published><updated>2011-07-11T02:00:58.846+10:00</updated><title type='text'>Hi, I have a question: 

why do you have a paramet...</title><content type='html'>Hi, I have a question: &lt;br /&gt;&lt;br /&gt;why do you have a parameter in the function &lt;br /&gt;&lt;br /&gt; private def getDataSourceForEnv(env) {&lt;br /&gt;        def servletContext = ServletContextHolder.servletContext&lt;br /&gt;        def ctx = servletContext&lt;br /&gt;                    .getAttribute(&lt;br /&gt;                         ApplicationAttributes.APPLICATION_CONTEXT)&lt;br /&gt;        return ctx.dataSource&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;you ar not using the parameter &amp;quot;env&amp;quot; ... is that ok? shouldnt you be using the parameter there? &lt;br /&gt;Thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/1014711731805661939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/1014711731805661939'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1310313658846#c1014711731805661939' title=''/><author><name>Rodrigo</name><uri>http://www.blogger.com/profile/07433121897837017978</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1782743913'/></entry><entry><id>tag:blogger.com,1999:blog-8662705757379383704.post-5844657701064992389</id><published>2011-06-23T22:54:20.628+10:00</published><updated>2011-06-23T22:54:20.628+10:00</updated><title type='text'>Great worked perfectly.
Thanks for the post.</title><content type='html'>Great worked perfectly.&lt;br /&gt;Thanks for the post.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5844657701064992389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8662705757379383704/2679552604349003229/comments/default/5844657701064992389'/><link rel='alternate' type='text/html' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html?showComment=1308833660628#c5844657701064992389' title=''/><author><name>kishora y s</name><uri>http://www.blogger.com/profile/00873086804407657726</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/-oiaB9oBq5Nw/Tfbt1AtFoNI/AAAAAAAABjE/fWVVy1fx56o/s220/ki.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.leebutts.com/2008/07/switchable-grails-datasource.html' ref='tag:blogger.com,1999:blog-8662705757379383704.post-2679552604349003229' source='http://www.blogger.com/feeds/8662705757379383704/posts/default/2679552604349003229' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-85013072'/></entry></feed>
