<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Bootstrapping WCF</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : Community Forum : Bootstrapping WCF</description>
  <pubDate>Fri, 10 Apr 2026 19:11:18 -700</pubDate>
  <lastBuildDate>Mon, 29 Jul 2013 16:28:53 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=4254</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Bootstrapping WCF : First and foremost, don&amp;#039;t...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4254&amp;PID=16665#16665</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 4254<br /><strong>Posted:</strong> 29-Jul-2013 at 4:28pm<br /><br />First and foremost, don't use Cocktail on the server as-is. Many parts of Cocktail are not threadsafe and that includes the single shared MEF container. Cocktail is a client framework written with a single UI thread in mind. A server is a different animal all together starting with the fact that it is multi-threaded by design.&nbsp;<div><br></div><div>The above won't work, because the WCF service is not created by MEF. You could call Composition.BuildUp(this) in the constructor to satisfy the imports, but again, don't do this on the server with Cocktial as-is, unless you want to create yourself a headache down the road.</div><div><br></div><div>If you only want to use the Compositon part of Cocktail on the server, the way to do that is to implement a threadsafe version of ICompositionProvider that sets up the MEF container per thread instead of a globally shared container. You can then call Compositon.SetProvider to configure Cocktail to use your threadsafe composition provider.</div>]]>
   </description>
   <pubDate>Mon, 29 Jul 2013 16:28:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4254&amp;PID=16665#16665</guid>
  </item> 
  <item>
   <title>Bootstrapping WCF :                 We have an...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4254&amp;PID=16664#16664</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=2161" rel="nofollow">amarpai</a><br /><strong>Subject:</strong> 4254<br /><strong>Posted:</strong> 29-Jul-2013 at 3:51pm<br /><br />         <div ="msg">   We have an existing WCF service and would like to get the Cocktail/DevForce injection to work. The code is as follows:<br><br><font face="Courier New, Courier, mono">&#091;Export(typeof(</font><font face="Courier New, Courier, mono"><font face="Courier New, Courier, mono">IMyWcfService</font>))&#093;<br>public class MyWcfService : IMyWcfService<br>{<br>&nbsp;&nbsp; &#091;Import(typeof(IMyUnitOfWork))&#093;<br>&nbsp;&nbsp; private </font><font face="Courier New, Courier, mono"><font face="Courier New, Courier, mono">IMyUnitOfWork</font> </font><font face="Courier New, Courier, mono"><font face="Courier New, Courier, mono">MyUnitOfWork</font>;<br><br>&nbsp;&nbsp; public Customer ProcessRequest(int id)<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Customer customer = await MyUnitOfWork.CustomerRepository.FindCustomer(id);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return customer;<br>&nbsp;&nbsp; }<br>}<br></font><br>The MyUnitOfWork field is not getting resolved. This is because Cocktail is not bootstrapped. I have seen examples of using Cocktail with WPF and I am able to get that to work. But the WCF part is not working.<br><br>Has anyone done this before?<br><br>Thanks!</div>]]>
   </description>
   <pubDate>Mon, 29 Jul 2013 15:51:05 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4254&amp;PID=16664#16664</guid>
  </item> 
 </channel>
</rss>