title: How can I update a DataSnap server while clients are still connected?
body: <p>We use stateful DataSnap servers for some business logic tasks and also to provide clientdataset data.</p>
  
  <p>If we have to update the server to modify a business rule, we copy the new version into a new empty folder and register it (depending on the Delphi version, just by launching or by running the TRegSvr utility).</p>
  
  <p>We can do this even while the old server instance is running. However, <strong>after registering the new version, all new client connections will still use the currently running (old) server instance</strong>. All clients have to disconnect first, then the new server will be used for the next clients.</p>
  
  <p>Is there a way to <strong>direct all new client connections to the new server</strong>, immediately after registering?</p>
  
  <p>(I know that new or changed method signatures will also require a change and restart of the clients but this question is about internal modifications which do not affect the interface)</p>
  
  <p>We are using Socket connections, and all clients share the same server application (only one application window is open). In the early days we have used a different configuration of the remote datamodule which resulted in one app window per client. Maybe this could be a solution? (because every new client will launch the currently registered executable)</p>
  
  <p>Update: does Delphi XE offer some support for 'hot deployment' (of updated servers)? We use Delphi 2009 at the moment but would upgrade to XE if it offers easier implementation of 'hot deployment'.</p>