<?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 : Is it possible to specify by code which BOS to use</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Is it possible to specify by code which BOS to use</description>
  <pubDate>Tue, 21 May 2013 22:56:56 -700</pubDate>
  <lastBuildDate>Tue, 15 Feb 2011 04:03:32 -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=1563</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>Is it possible to specify by code which BOS to use : @WardBell -Thanks for your reply.I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9956#9956</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1073" rel="nofollow">Cornholio</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 15-Feb-2011 at 4:03am<br /><br />@WardBell -<br><br>Thanks for your reply.<br>I understand that once an EntityManager has been created it will never go back to the <em><strong><u>IdeaBladeConfig.Instance</u></strong>.</em><br><br>I'm interested in the following statement you made above:<br><i>"Here at IdeaBlade we have discussed options for resetting that choice dynamically. Let me know if this is critical to you."</i><br><br>I was hoping there would be an easier way than Seperate AppDomains.<br><br>Maybe if I outline our situation a bit more:<br><br>We have a decentralized solution with each geographically remote site having their own BOS and Database (replicated with a master DB).<br><br>We are making use of the Subscription/Notification feature to see who is logged on, what version they are running, send them messages, install the latest version, etc.<br><br>Our central services need a way of easily checking with each BOS for the logged on users and sending notifications.<br>Restarting the app for each site unfortunately isnt an option.<br><br><br>]]>
   </description>
   <pubDate>Tue, 15 Feb 2011 04:03:32 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9956#9956</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : @cornholio -  Stephenmcd1 described...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9943#9943</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 14-Feb-2011 at 9:18am<br /><br />@cornholio -<DIV>&nbsp;</DIV><DIV>Stephenmcd1 described succintly how you can set any of the client-side configurations in code:</DIV><P>"<EM>For configuring the BOS adddress through code, I've had luck by setting properties on the <strong><U>IdeaBladeConfig.Instance</U></strong>.ObjectServer object (ServerPort, RemoteBaseUrl, ServiceName, etc.). As long as I set those up before using an EntityManager, things seem to work."</EM></P><DIV></DIV><P>Your client code could set the BOS address dynamically based on criteria you determine locally (IPAddress? User name? ComboBox?). Remember to do so BEFORE you defining or using an EntityManager (even implicitly)</P><P>Once an EntityManager has extracted what it needs from the <strong><EM><U>IdeaBladeConfig.Instance</U></EM></strong>&nbsp;, it never looks back. Changing it later won't do a thing.</P><DIV></DIV>If you need to switch among different BOS <strong><EM>locations</EM></strong>, you'll have to do that out-of-band somehow. One possibility is to run separate instances of your client application in different AppDomains. You can create and destroy those on the fly. Each AppDomain is its own little world with a private set of static values.<DIV>&nbsp;</DIV><DIV>I emphasize the word "<strong>location</strong>" because you can reach multiple BOS instances behind a Load Balancer located a one particular address.</DIV><DIV>&nbsp;</DIV><DIV>HTH</DIV>]]>
   </description>
   <pubDate>Mon, 14 Feb 2011 09:18:37 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9943#9943</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : Hi Ward,Above you mentioned the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9940#9940</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1073" rel="nofollow">Cornholio</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 14-Feb-2011 at 4:24am<br /><br />Hi Ward,<br><br>Above you mentioned the possibility of dynamically resetting some statistics and re-using the IdeaBladeConfig.<br>How would I go about this?<br><br>We have multiple sites running their own BOS which our central services need to connect to on the fly.<br>Otherwise, is it possible to connect to multiple BOS'es at the same time?<br><br>Thanks<br><br>]]>
   </description>
   <pubDate>Mon, 14 Feb 2011 04:24:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=9940#9940</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : @ouelletf - Stephenmcd1&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5845#5845</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 20-Nov-2009 at 4:08pm<br /><br />@ouelletf - Stephenmcd1's answer is the answer I would have given you (and my thanks to him). It is the way I would do it.<DIV>&nbsp;</DIV><DIV>Do realize that once you have tried to reach the BOS from a client AppDomain, you are committed to that BOS address henceforth. A bunch of statics are set and we don't look at the IdeaBladeConfig again for that information.</DIV><DIV>&nbsp;</DIV><DIV>Here at IdeaBlade we have discussed options for resetting that choice dynamically. Let me know if this is critical to you.</DIV><DIV>&nbsp;</DIV><DIV>I do not understand the question about specifying a DataSourceKeyResolver to the EntityManager nor do I fathom the notion of providing an EntityManager with a connection string. </DIV><DIV>&nbsp;</DIV><DIV>You never provide the EntityManager with a connection string. We don't want connection strings residing on the client; bad for security.</DIV><DIV>&nbsp;</DIV><DIV>To switch data source contexts (which is the point of our DataSourceExtension facility), you provide a newly created EntityManager (EM) with a string, the "DataSourceExtension". This string is bundled&nbsp;with your requests&nbsp;for persistence operations. The BOS solders this extension (e.g., "Foo")&nbsp;to the&nbsp;DataSourcekey embedded in the operation request&nbsp;(e.g.,&nbsp;"Default") yielding a full DataSourceKey ("Default_Foo") to be resolved by the DataSourceKeyResolver on the Server. </DIV><DIV>&nbsp;</DIV><DIV>Let me repeat that phrase "on the Server". The Resolver is always on the server, never on the client. The Resolver is a class that implements IDataSourceKeyResolver - a class you define in one of your custom assemblies. You deploy that assembly into one of the locations mentioned in your server-side config as a "Probe Assembly" location. DevForce finds it and uses it instead of&nbsp;our default Resolver.</DIV><DIV>&nbsp;</DIV><DIV>Any DataSourceKeyResolver takes the combined key (base + extension = "Default_Foo") and translates it to an EDM Key holding the proper connection string. </DIV><DIV>&nbsp;</DIV><DIV>All of this is described in the Developers Guide better than I'm doing here; I'm just trying to give you the sense of it.</DIV><DIV>&nbsp;</DIV><DIV>Our default DataSourceKeyResolver uses information inside your config file. Your Resolver (which implements IDataSourceKeyResolver) can do anything you want, including delegate to the default DevForce Resolver. Many people write a Resolver that calls out to some server-side connection string provider that they can maintain by whatever means feels convenient; it could be an Excel spreadsheet.</DIV><DIV>&nbsp;</DIV><DIV>Hope this helps.</DIV>]]>
   </description>
   <pubDate>Fri, 20 Nov 2009 16:08:16 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5845#5845</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : For configuring the BOS adddress...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5837#5837</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=613" rel="nofollow">stephenmcd1</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 19-Nov-2009 at 5:42pm<br /><br /><P>For configuring the BOS adddress through code, I've had luck by setting properties on the IdeaBladeConfig.Instance.ObjectServer object (ServerPort, RemoteBaseUrl, ServiceName, etc.).  As long as I set those up before using an EntityManager, things seem to work.  </P><P>I'm not sure if this is the best way though - I'd like to hear if there are other/better ways.</P>]]>
   </description>
   <pubDate>Thu, 19 Nov 2009 17:42:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5837#5837</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : Also it would be great to be able...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5832#5832</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=504" rel="nofollow">ouelletf</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 18-Nov-2009 at 3:41pm<br /><br />Also it would be great to be able to specify an IDataSourceKeyResolver to the EntityManager ctor. Now we have to have a singleton that contain the connection parameters we which to use.]]>
   </description>
   <pubDate>Wed, 18 Nov 2009 15:41:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5832#5832</guid>
  </item> 
  <item>
   <title>Is it possible to specify by code which BOS to use : Is it possible to specify which...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5831#5831</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=504" rel="nofollow">ouelletf</a><br /><strong>Subject:</strong> 1563<br /><strong>Posted:</strong> 18-Nov-2009 at 3:37pm<br /><br />Is it possible to specify which BOS to use (address, port and service name) from code.<br /><br />Something similar to IDataSourceKeyResolver maybe ?<br /><br />I want to allow the user to choose on which server he is logging on.]]>
   </description>
   <pubDate>Wed, 18 Nov 2009 15:37:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1563&amp;PID=5831#5831</guid>
  </item> 
 </channel>
</rss>