<?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 : WCF and Idealblade</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : WCF and Idealblade</description>
  <pubDate>Sun, 12 Apr 2026 08:47:41 -700</pubDate>
  <lastBuildDate>Tue, 21 Feb 2012 12:18:01 -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=3271</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>WCF and Idealblade :     Hi hartdrooz,Since your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3271&amp;PID=12716#12716</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3271<br /><strong>Posted:</strong> 21-Feb-2012 at 12:18pm<br /><br />Hi hartdrooz,<div>&nbsp;</div><div>Since your EntityManager was created in the first request, you wouldn't have a problem there because it was created and used in the same thread. For every subsequent request, most likely it will run a different thread and then the error you are getting.</div><div>If you are certain that there won't be more than 1 client connection at the same time, you could simply set </div><div><em></em>&nbsp;</div><div><em>managerAuthorizeThreadId = null;</em></div><div><em></em>&nbsp;</div><div>However, if there is more than one client request concurrently that uses the same EntityManager, you might face some unwanted behavior. In this case your best option is to set a new EntityManager for each request. (However, since your service is by session, you wouldn't run into this)</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div><span style="font-size:10px"><br /><br />Edited by sbelini - 21-Feb-2012 at 1:04pm</span>]]>
   </description>
   <pubDate>Tue, 21 Feb 2012 12:18:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3271&amp;PID=12716#12716</guid>
  </item> 
  <item>
   <title>WCF and Idealblade : Hi,I created a WCF service, in...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3271&amp;PID=12693#12693</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1391" rel="nofollow">hartdrooz</a><br /><strong>Subject:</strong> 3271<br /><strong>Posted:</strong> 17-Feb-2012 at 11:31am<br /><br />Hi,<br><br>I created a WCF service, in this service I use idealblade to retrieve the data and send the entities to the client.<br><br>I have a class, this class have a constructor and in this constructor I create an instance of my entityManager (this is inside a private variable of the class).<br><br>After that the other methods use this private variable to do my queries.<br><br>The WCF service is by session so when the session is closed I do a disconnect to my private variable and I put it null.<br><br>So I open my client first time I retrieve data from a table it works without any problem.<br><br>I close my client, I open it again I do the same call and I got an error than I cannot run the query in this thread because it's use by another thread .....<br><br>I don't understand why ? <br><br>So I remove the private variable and create a variable inside each methods that do a call to the database in the WCF service and I don't have this error anymore.<br><br>But is not really a good pratice, I want to have a private variable inside the class and I was expecting no problem of threading because the client is closed etc...<br><br>Regards<br>]]>
   </description>
   <pubDate>Fri, 17 Feb 2012 11:31:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3271&amp;PID=12693#12693</guid>
  </item> 
 </channel>
</rss>