Change Service Endpoint After App Startup

leif.wells's Avatar


24 Jan, 2011 10:07 PM


I am working on an AIR application that has a very specific use and which will connect with a server on the local network (as in I know that the server will be somewhere around 10.10.XXX.XXX). I'll need to be able to allow on-site techies to change the IP address of the applications service end point but the best place to apply that change is on the login screen --- which, of course, after our ApplicationContext file has been instantiated.

Is there a best practice that we can follow in this instance? Should we unmap services and remap? Should we find a way to kill ApplicationContext and reload? Are we thinking about this wrong?

What do you think?


Leif Wells
Atlanta (for now)

  1. Support Staff 1 Posted by Till Schneidere... on 24 Jan, 2011 10:14 PM

    Till Schneidereit's Avatar

    Why don't you simply see this as just another case of data input via a
    view? The view would then dispatch an event, which in turn triggers a
    command, updating a model or, if you prefer to have you service
    stateful, the service itself.

  2. 2 Posted by Stray on 24 Jan, 2011 10:31 PM

    Stray's Avatar

    Agreed - make the IP a property of a model, that can be updated during runtime.

    Instead of injecting the IP, inject the model that holds the IP.

    Shout if you have any more questions,


  3. Stray closed this discussion on 11 Feb, 2011 11:16 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac