Print Page | Close Window

2-Tier App connect to Remote BOS

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3259
Printed Date: 02-May-2024 at 5:45pm


Topic: 2-Tier App connect to Remote BOS
Posted By: sebma
Subject: 2-Tier App connect to Remote BOS
Date Posted: 10-Feb-2012 at 1:52am
Hi,

I am using DevForce 6.1.5.
I have a 2-Tier application (Windows Service) that performs updates in the backend directly to database.
I now want this 2-Tier app to login to a remote BOS to perform just some specific tasks via existing RPC methods.

The following link show how to use ServiceKeys to connect to multiple BOS:
http://drc.ideablade.com/xwiki/bin/view/Documentation/connect-to-multiple-entityservers

However, I am not sure about the following config. The 2-Tier app will connect to its own local (in-process) BOS because this 2-Tier config does not set <clientSettings isDistributed="true" />

 <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig">
    <objectServer remoteBaseURL="http://localhost" serverPort="9010" serviceName="LocalEntityService"/>
       <serviceKeys>     
         <serviceKey name="remoteBOS" remoteBaseURL="http://localhost" serviceName="EntityService" serverPort="9009" />
       </serviceKeys>

I know one can resort to writing own WCF.
The question is how can I use DevForce to simplify this by enabling an existing 2-Tier app to call the remote BOS specifically?

Best Regards
Seb



Replies:
Posted By: kimj
Date Posted: 10-Feb-2012 at 11:02am
Hi Sebastian,
 
When you create an EntityManager it will by default use an EntityServiceOption setting which tells it to look at the clientSettings in the config file.  Here, to get your EntityManager talking to a remote BOS, you should pass an EntityServiceOption.UseDistributedService parameter into the constructor.   You don't actually need to use a serviceKey here, but can.  If you don't use a serviceKey, make sure that the settings on the objectServer are correct for the remote BOS.  (They're actually ignored altogether when running in 2-tier mode.)
 
 


Posted By: sebma
Date Posted: 12-Feb-2012 at 8:44pm
Hi Kim,
 
Thanks for the tips. This is exactly what I wanted.
 
Thanks much!
Seb



Print Page | Close Window