<?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: Extending NHibernate&#8217;s DriverConnectionProvider</title> <atom:link href="http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/feed/" rel="self" type="application/rss+xml" /><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/</link> <description>inquisitive: adjective. given to inquiry, research, or asking questions; eager for knowledge; intellectually curious</description> <lastBuildDate>Sun, 20 May 2012 21:55:00 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: Gebb</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-57795</link> <dc:creator>Gebb</dc:creator> <pubDate>Mon, 06 Sep 2010 09:07:14 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-57795</guid> <description>It works. Thank you very much!</description> <content:encoded><![CDATA[<p>It works. Thank you very much!</p> ]]></content:encoded> </item> <item><title>By: The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Avoiding MySQL&#8217;s MAX_JOIN_SIZE Limit With NHibernate</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-10804</link> <dc:creator>The Inquisitive Coder - Davy Brion&#8217;s Blog &#187; Blog Archive &#187; Avoiding MySQL&#8217;s MAX_JOIN_SIZE Limit With NHibernate</dc:creator> <pubDate>Mon, 30 Mar 2009 11:26:58 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-10804</guid> <description>[...] remembered a trick i had used earlier, which is to extend NHibernate&#8217;s DriverConnectionProvider. It could then set the setting with [...]</description> <content:encoded><![CDATA[<p>[...] remembered a trick i had used earlier, which is to extend NHibernate&#8217;s DriverConnectionProvider. It could then set the setting with [...]</p> ]]></content:encoded> </item> <item><title>By: tobsen</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-3516</link> <dc:creator>tobsen</dc:creator> <pubDate>Mon, 13 Oct 2008 12:37:50 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-3516</guid> <description>Ok, at least I didn&#039;t missed some obvious thing ;)
Thanks again for your fast reply!</description> <content:encoded><![CDATA[<p>Ok, at least I didn&#8217;t missed some obvious thing <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br
/> Thanks again for your fast reply!</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-3515</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 13 Oct 2008 12:33:03 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-3515</guid> <description>ah ok, i see what you mean... unfortunately, i don&#039;t think it&#039;s gonna be possible without an ugly hack :p</description> <content:encoded><![CDATA[<p>ah ok, i see what you mean&#8230; unfortunately, i don&#8217;t think it&#8217;s gonna be possible without an ugly hack :p</p> ]]></content:encoded> </item> <item><title>By: tobsen</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-3513</link> <dc:creator>tobsen</dc:creator> <pubDate>Mon, 13 Oct 2008 12:31:04 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-3513</guid> <description>Wow, quick reply, thanks! :)
Well, I think I need it the other way around: MyProvider has no external dependencies.
However I have another component (AnotherComponent) which needs the same MyProvider instance Nhibernate is using.The MyProvider implements two interfaces:
public class MyProvider : NHibernate.Connection.DriverConnectionProvider, IAnotherInterfaceAnotherComponent needs an Object of type IAnotherInterface:
public AnotherComponent(IAnotherInterface needsToBeTheSameMyProviderInstance)If I could set an Instance to NHibernate, I could let Spring do the binding via its config for both NHibernate as well as for AnotherComponent.Any idea or am I just missing something?</description> <content:encoded><![CDATA[<p>Wow, quick reply, thanks! <img
src='http://d18sni7re4ly7f.cloudfront.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> Well, I think I need it the other way around: MyProvider has no external dependencies.<br
/> However I have another component (AnotherComponent) which needs the same MyProvider instance Nhibernate is using.</p><p>The MyProvider implements two interfaces:<br
/> public class MyProvider : NHibernate.Connection.DriverConnectionProvider, IAnotherInterface</p><p>AnotherComponent needs an Object of type IAnotherInterface:<br
/> public AnotherComponent(IAnotherInterface needsToBeTheSameMyProviderInstance)</p><p>If I could set an Instance to NHibernate, I could let Spring do the binding via its config for both NHibernate as well as for AnotherComponent.</p><p>Any idea or am I just missing something?</p> ]]></content:encoded> </item> <item><title>By: Davy Brion</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-3512</link> <dc:creator>Davy Brion</dc:creator> <pubDate>Mon, 13 Oct 2008 11:50:56 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-3512</guid> <description>I can&#039;t find anything regarding a ConnectionProvider factory or anything like that, so i don&#039;t think you can make it do what you want to do.You could provide two constructors to achieve what you want though...public MyProvider() : this(IoC.Resolve(typeof(IDependency1)), IoC.Resolve(typeof(IDependency2)))
{}public MyProvider(IDependency1 dep1, IDependency2 dep2)
{
...
}Not perfect, but if no other way exists, it&#039;s not so bad i guessbtw, i used the Resolve(typeof())) syntax because i&#039;m too lazy to find out how to escape the generic bracket thingies :p</description> <content:encoded><![CDATA[<p>I can&#8217;t find anything regarding a ConnectionProvider factory or anything like that, so i don&#8217;t think you can make it do what you want to do.</p><p>You could provide two constructors to achieve what you want though&#8230;</p><p>public MyProvider() : this(IoC.Resolve(typeof(IDependency1)), IoC.Resolve(typeof(IDependency2)))<br
/> {}</p><p>public MyProvider(IDependency1 dep1, IDependency2 dep2)<br
/> {<br
/> &#8230;<br
/> }</p><p>Not perfect, but if no other way exists, it&#8217;s not so bad i guess</p><p>btw, i used the Resolve(typeof())) syntax because i&#8217;m too lazy to find out how to escape the generic bracket thingies :p</p> ]]></content:encoded> </item> <item><title>By: tobsen</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-3511</link> <dc:creator>tobsen</dc:creator> <pubDate>Mon, 13 Oct 2008 11:43:08 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-3511</guid> <description>Well, that was easy. But how can I set the actual connection.provider programmtically? I would like to create the MyDriverConnectionProvider instance myself (or let another DI-container...) and pass the initialized instance to Nhibernate. Do you know how to do that?</description> <content:encoded><![CDATA[<p>Well, that was easy. But how can I set the actual connection.provider programmtically? I would like to create the MyDriverConnectionProvider instance myself (or let another DI-container&#8230;) and pass the initialized instance to Nhibernate. Do you know how to do that?</p> ]]></content:encoded> </item> <item><title>By: pho</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-2410</link> <dc:creator>pho</dc:creator> <pubDate>Fri, 19 Sep 2008 14:24:11 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-2410</guid> <description>now that IS easy!</description> <content:encoded><![CDATA[<p>now that IS easy!</p> ]]></content:encoded> </item> <item><title>By: Extending NHibernate's DriverConnectionProvider - NHibernate blog - NHibernate Forge</title><link>http://davybrion.com/blog/2008/09/extending-nhibernates-driverconnectionprovider/comment-page-1/#comment-2388</link> <dc:creator>Extending NHibernate's DriverConnectionProvider - NHibernate blog - NHibernate Forge</dc:creator> <pubDate>Thu, 18 Sep 2008 18:53:08 +0000</pubDate> <guid
isPermaLink="false">http://davybrion.com/blog/?p=451#comment-2388</guid> <description>[...] Note: this was orginally posted on my own blog [...]</description> <content:encoded><![CDATA[<p>[...] Note: this was orginally posted on my own blog [...]</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 2/13 queries in 0.007 seconds using disk: basic
Object Caching 461/462 objects using disk: basic
Content Delivery Network via Amazon Web Services: CloudFront: d18sni7re4ly7f.cloudfront.net

Served from: davybrion.com @ 2012-05-21 13:00:54 -->
