When using Tide in an AIR application it's sometimes necessary to modify the server address once a connection is already made (Or when a faulty connection is made). The server settings can be set using the ServiceInitializer:
Ejb.getInstance().addComponentWithFactory("serviceInitializer", DefaultServiceInitializer, {
contextRoot: '/my-app',
serverName: 'my-server',
serverPort: 8080
});
However. When a connection is already established by the RemoteObject, modifying the serverInitializer doesn't effect the connection, because the RemoteObject should be disconnected first.
A workaround is to add an extra method to Tide to reset the RemoteObject:
public function resetConnection():void {
if (_ro) {
_ro.disconnect();
}
_ro = null;
}
Refer to
https://groups.google.com/forum/#!topic/graniteds/wITFxXyXTYw for the corresponding thread.