Implementing a Dynamic Server
We consider here a dynamic server as a dynamic view server running a dynamic model. Call IlsDynMvServer::Initialize instead of IlsMvServer::Initialize as the initialization function when you want to use the dynamic modeling capabilities of Rogue Wave® Server.
Example
int main(int argc, char* argv[])
{
...
if (!IlsDynMvServer::Initialize(argc,argv)) {
...
}
IlsMvServer::Run();
}
This method takes the same arguments as IlsMvServer::Initialize, plus:
-ilsm <model_file.xml> to load an XMI dynamic model file at startup.
-ilsj <script_file> to load an Rogue Wave Script file.
Note: Calling IlsDynMvServer::Initialize creates an instance of IlsMvServer (or of a subclass if you have installed a factory), because this member function does not install any specific factory. |
The model file, if any, is loaded first, then the script file and then the dynamic views. A dynamic server must link with the dynmvsvr and iljs libraries.
Important Reminder
If you choose to work with dynamic modeling services, your dynamic model must be fully created at the beginning of the application and especially:
before loading a script file;
before opening any dynamic view.
Rogue Wave Script scripts can manipulate both the static and the dynamic models as they are defined the first time the member function IlsScriptManager::LoadScript is called. Any subsequent modification of the dynamic model will not be reflected in the Rogue Wave Script integration. As a consequence, if you want to update your dynamic model using the IlsDynModelInterpreter API, you should do it before calling the IlsDynMvServer::Initialize method.
Note: If you use dynamic modeling services, you must compile your application with RTTI enabled. |
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.