Hi Ben, Thanks for the input! I agree with your suggestion about localizing the DALConfig to the service host. I will reorganize the code and upload a patch.
I think SQLHelper would have to be used either way to query the database if we want to use a database configuration system? Is there another way to find the BS associated to "DOTNET_CLIENT" in the CLIENTTOBS tables, etc? Maybe this will be clearer when I upload the patch. Thanks, Avantika -----Original Message----- From: Ben Dewey (JIRA) [mailto:j...@apache.org] Sent: Wednesday, June 17, 2009 8:15 PM To: stonehenge-dev@incubator.apache.org Subject: [jira] Commented: (STONEHENGE-67) Setup .NET Client/BS/OPS to get Active BS/OPS from config service [ https://issues.apache.org/jira/browse/STONEHENGE-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12721040#action_12721040 ] Ben Dewey commented on STONEHENGE-67: ------------------------------------- Avantika I'm confused as to why SQLHelper is being involved here. If you could upload the patch (don't use STONEHENGE-67.patch, use something like test.patch). I was not expecting the config to be used through the DAL factory from the business service. I was thinking the ConfigConsole would host a ConfigImplementation and the DALConfig would be localized to that service host. Then, a ConfigClient would be created and you'd call the configClient.getBs("DOTNET_BS") from BS. Finally, I would disconnect the Settings from the BusinessServiceImplementation and instead of Settings.DAL and Settings.TRADE_DB_CONN_STRING use something like this throughout var client = new ConfigClient(); var bsConfig = client.getBs("DOTNET_BS"); dalCustomer = Trade.DALFactory.Customer.Create(bsConfig.DBName); var connString = ConfigurationStringHelper.Create(bsConfig.DBHostName, bsConfig.DBPort); dalCustomer.Open(connString); And under the placeOrder method replace Settings.orderMode with: var client = new ConfigClient(); var bsConfig = client.getBs("DOTNET_BS:); var asyncclient = new TradeOrderServiceAsyncClient(bsConfig.OPS); This is just my thoughts, so others please comment. This would call the config methods everytime a BS operation is called. I believe this is similar to how PHP does it. This code can be cleaned up, but the main pro is that if the DB is updated the config will automatically take affect (ie. no restart required) and the major con is that a webservice call is made prior to every DB call. For your other questions. - don't feel tied to the Settings file. - I'd hope to atleast remove the DB config settings from all config files except ConfigConsole/App.config - I think putting the WCF config in the DB might not worth it. I would like to see all the endpoints using a common WCF config and not (wsHttp and custom) > Setup .NET Client/BS/OPS to get Active BS/OPS from config service > ------------------------------------------------------------------ > > Key: STONEHENGE-67 > URL: https://issues.apache.org/jira/browse/STONEHENGE-67 > Project: Stonehenge > Issue Type: New Feature > Reporter: Avantika Agrawal > > Once the config service is created, hook up the .NET Client/BS/OPS to find > the endpoints from the database > i.e. configuration should happen from the database rather than the config > files - replicating the functionality of the PHP implementation -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.