<?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 : DataSourceKeyMap is too persistent</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : DataSourceKeyMap is too persistent</description>
  <pubDate>Mon, 13 Apr 2026 00:08:39 -700</pubDate>
  <lastBuildDate>Wed, 23 Nov 2011 09:55:00 -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=3105</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>DataSourceKeyMap is too persistent :   When youuse a dynamic key...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12103#12103</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3105<br /><strong>Posted:</strong> 23-Nov-2011 at 9:55am<br /><br />When you&nbsp;use a dynamic key extension like this you'll effectively have one EntityServer per Silverlight client, which in the long run is probably not what you want.&nbsp; DevForce will create one EntityServer per key extension, but this usually translates into many clients with that key extension communicating with the one EntityServer dedicated to them.&nbsp; <div>&nbsp;</div><div>Since your login process is not part of the Silverlight application, you might be able to use initParams to pass the server information to the SL application, which in turn would use this as its key extension when creating an EntityManager.&nbsp; </div><div>&nbsp;</div><div>If initParams won't work, then maybe use one extension-less EntityManager to ask (maybe via an RPC call) which server it should be using for the user, and then create an EntityManager with a key extension representing that server.</div>]]>
   </description>
   <pubDate>Wed, 23 Nov 2011 09:55:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12103#12103</guid>
  </item> 
  <item>
   <title>DataSourceKeyMap is too persistent :   Nevermind. Solution was simple.When...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12102#12102</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=947" rel="nofollow">MVenhola</a><br /><strong>Subject:</strong> 3105<br /><strong>Posted:</strong> 23-Nov-2011 at 7:11am<br /><br />Nevermind. Solution was simple.<div></div><div>When creating the entity manager on the client side, I pass a Guid.NewGuid().ToString("N") as the extension key, forcing each silverlight app to have it's own key values in the map.</div><div>&nbsp;</div><div>Works as expected now.</div>]]>
   </description>
   <pubDate>Wed, 23 Nov 2011 07:11:28 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12102#12102</guid>
  </item> 
  <item>
   <title>DataSourceKeyMap is too persistent :   But it doesn&amp;#039;t help.The...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12101#12101</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=947" rel="nofollow">MVenhola</a><br /><strong>Subject:</strong> 3105<br /><strong>Posted:</strong> 23-Nov-2011 at 6:55am<br /><br />But it doesn't help.<div>&nbsp;</div><div>The environment is selected on the server side during the login process.&nbsp; Silverlight app is initialized after this.&nbsp; The extension key wouldn't be known when the EntityManager is created on the client side.&nbsp; It's a catch 22.</div><div>&nbsp;</div><div>Hence the need to be able to clear the map.</div>]]>
   </description>
   <pubDate>Wed, 23 Nov 2011 06:55:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12101#12101</guid>
  </item> 
  <item>
   <title>DataSourceKeyMap is too persistent :  Hi MVenhola;Currently, there...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12095#12095</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 3105<br /><strong>Posted:</strong> 22-Nov-2011 at 5:35pm<br /><br />Hi MVenhola;<div><br></div><div>Currently, there isn't a way to reset the keys.</div><div><br></div><div>However, your use case seems like a perfect example to use DataSourceExtension. Basically you pass in your DataSourceExtension when you create your EntityManager, and in your IDataSourceKeyResolver.GetKey method, you just resolve different keys based on the extension passed in.</div><div><br></div><div>See&nbsp;<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/data-sources#HDynamicc&#111;nnecti&#111;nstrings" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/data-sources#HDynamicconnectionstrings</a>&nbsp;for more details.</div><div><br></div><div>Hope this helps.</div><span style="font-size:10px"><br /><br />Edited by DenisK - 22-Nov-2011 at 5:39pm</span>]]>
   </description>
   <pubDate>Tue, 22 Nov 2011 17:35:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12095#12095</guid>
  </item> 
  <item>
   <title>DataSourceKeyMap is too persistent :   The DataSourceKeyMapdictionary...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12092#12092</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=947" rel="nofollow">MVenhola</a><br /><strong>Subject:</strong> 3105<br /><strong>Posted:</strong> 22-Nov-2011 at 7:55am<br /><br />The DataSourceKeyMap&nbsp;dictionary in the DataSourceResolver object is a static property!&nbsp; This is causing some real headaches.&nbsp; <div></div>We've implemented a custom login screen with a server selection option.&nbsp; After logging in our KeyResolver picks up our keys based on the server selection.<div>&nbsp;</div><div>User logs out and the forms authentication login screen comes up as expected.</div><div>&nbsp;</div><div>User logs in again, selecting a different server.&nbsp; However, because the DataSourceKeyMap is static (and apparently, not clearable... we tried EntityManager.DataSourceResolver.DataSourceKeyMap.Clear(), didn't work), the only way the keys are reset is by closing the browser (ie, shutting down the app).</div><div>&nbsp;</div><div>Shouldn't there be&nbsp;a way to reset the keys?</div>]]>
   </description>
   <pubDate>Tue, 22 Nov 2011 07:55:48 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3105&amp;PID=12092#12092</guid>
  </item> 
 </channel>
</rss>