If you create once your channel configuration, what would you need to
recreate it over and over again if you could just use the same?
You could also use the Spring ActionScript framework to do the config from
an xml file instead of changing the file and then re-compiling your app.
Although using a single bindable string var to a endPoint and then change
this var value and recompile.
Use tokens (the default) instead of hardcoded urls.
When using tokens, you don't have to change anything when switching servers/environments.
As it stands now I have all my remote services declared in a separate file "remote-services.xml" that I include in the services-config.xml via a 'services' entry. Following this I have two 'channel-definition' entries: one for test and one for release. I have been commenting out the one Im not using.
Given that my 'default-channels' entry has one entry pointing to the 'channel-definition' above Im hoping that I can simpy replace the AMFChannel with a SecureAMFChannel pointing to the release server.
Does that make any sense?
I see where I can get the channel-definition entry using the ServerConfig.getChannel() call. Now how do I change this at run-time and save the new version so all my remote calls will use the new definition?
Fixed: As it turns out I was able to use the existing setup of services-config.xml and remote-config.xml. In desperation I tried adding both the test and release servers into the 'default-channels' entry. It turns out that it fails-over v quickly. The test server isn't accessible from the release point so I put it first. Works fine.
Message was edited by: ethr