In this example, the same dynamic model is loaded into several Domain Managers, each starting with a different --conf directory. Instead of copying the same compiled dynamic model file (the file with extension .ldm) to each BASEDIR/smarts/local/model/<conf> directory, one single copy is created and compiled in BASEDIR/smarts/local/model. Each of the Domain Managers is then started with the --dynamic command line option to load the compiled dynamic model file from BASEDIR/smarts/local/model.
To create the dynamic model:
-
Create and edit a new file in the BASEDIR/smarts/local/modeldirectory. Type the following at a command prompt:
BASEDIR /smarts/bin/sm_edit --create model/Example2.mdl
-
To add the serial number attribute to the Router class, type the following lines into the Example2.mdl file.
refine interface Router { stored attribute string SM_SerialNumber "Custom serial number" = "NotAvailable"; }
-
Save and close the Example2.mdl file.
The file is saved in the BASEDIR/smarts/local/modeldirectory.