Xda 4.1 Tutorial: Running ACE + Tao
Purpose:To start the ACE + Tao implementation repository (IMR), the IMR activator, And the Naming Service when running persistent or just the Naming Service when running in transient. xda-encapsulated CORBA servers will need to be installed with the Tao IMR to make the serverPersistentObjectAutomaticActivation.
Tutorial requirements:Click here to get descriptions of the software and environment variables.
Software
Required
Forte
No
. Net
No
Java
Yes
ACE + Tao
Yes
Jac
No
Ant
Yes
Environment Variable
Required
Xda_root
Yes
Ace_root
Yes
Tao_root
Yes
Java_home
Yes
Ant_home
Yes
Jacorb_home
No
Libraries
None
Include paths
None
Procedure:
- Provided that you have Ant and Java installed, the easiest way to start the Tao IMR, IMR activator, and Naming Service is to use the built-in ant scripts. Copy$(XDA_ROOT)/share/classes/xdatasks.jarTo$(ANT_HOME)/libFolder. in $ (xda_root)/share/bin, copy the template. xdaorb. properties to xdaorb. properties and edit the xdaorb. properties file. you shoshould adjust the properties as appopriate for your installation of xda. when using ant, remember to copy$(XDA_ROOT)/share/classes/xdatasks.jarTo$(ANT_HOME)/libDirectory. To get more verbose output from ant, you can add-verboseArgument To Your ant command. the default setting in the xdaorb. properties file is to run transient objects. to change to persistent objects, refer to transient persistent tutorial. if the settings are for persistent, in the $ (xda_root)/share/bin directory, Type
ant tao.start
To start the Tao IMR, activator, and Naming Service. two interoperable object reference (IOR) files will be created in accordance with the Tao. IMR. ior and Tao. NS. ior properties in the xdaorb. properties file. both the tao_imr.ior (Implementation repository ior) and tao_ns.ior (Naming Service ior) will be created in the $ xda_root directory. depending on your OS, either 3 xterms (UNIX) or 3 command prompts (WINXP) will be created; each will be running either the IMR, IMR activator, or the Naming Service.
- If the settings are for transient, typing:
ant tao.start
Will bring up a single xterm (UNIX) or command prompt (WINXP) in which the naming service is running. The Naming Service ior will also be in the location specified by the configuration GTO.
- To install an xda encapsulated component using the built-in ant script, type the following:
Ant Tao. Install-dimpl = <impl_name>-dexe = <path_to_exe>
Where <impl_name> is the unique name of your server and <path_to_exe> is the path to the server's executable file. for a more specific example of using this script, please refer to the xdasimple example.
- For persistent settings, this will actually install the xda component into the Tao IMR and Naming Service and will allow the IMR activator to automatically activate this component.
- For the transient setting, the component is only installed in the Naming Service and will run in a new xterm (UNIX) or command prompt (WINXP ).
- To stop the Tao IMR, IMR activator, and naming service using the built-in ant scripts, type the following:
ant tao.stop
(Behind ant ):In cases where the user can not use ant, typingant -verbose <ant-argument>Prints out the actual commands issued by Ant. Below are the commands for the persistent setting only.
- For Windows, This is the command that starts the Tao implementation Repository:
Start C:/vc70tao/xda/bin/xdacmd.exe implrepo D:/ace_wrappers/TAO/orbsvcs/implrepo_service/implrepo_service.exe-o C:/vc70tao/export-interval 1
Where % xda_root % isC:/vc70tao.-o C:/vc70tao/tao_imr.iorArgument specifies the location of the IMR ior file. similary, the following WINXP command starts the Naming Service:
Start C:/vc70tao/xda/bin/xdacmd.exe naming_service D:/ace_wrappers/TAO/orbsvcs/naming_service/naming_service.exe-o C:/vc70tao/tao_ns.ior-limit 1
Where-o C:/vc70tao/tao_ns.iorArgument specifies the location of the Naming Service ior file. To start the IMR activator, use:
Start C:/vc70tao/xda/bin/xdacmd.exe imr_act D:/ace_wrappers/TAO/orbsvcs/implrepo_service/imr_activator.exe-orbinitref nameservice = file:/C: /vc70tao/tao_ns.ior-orbinitref implreposervice = file: // C:/vc70tao/tao_imr.ior
.
- For UNIX, start the Tao IMR by typing:
/Bin/sh-c "xterm-FN 6x13-Sb-Sl 3000-geometry 80x12 + 0 + 0-FG black-BG '# ccccff'-title implrepo- e/proj/xda/ACE + TAO/x.3.1/sun54/ace_wrappers/TAO/orbsvcs/implrepo_service-O/local/xda4.1/sun54tao/digest-prop 1 </dev null >/dev/null 2> & 1 &"
Where $ xda_root is/local/xda4.1/sun54taoAnd-o /local/xda4.1/sun54tao/tao_imr.iorArgument specifies the location of the IMR ior file. Type:
/Bin/sh-c "xterm-FN 6x13-Sb-Sl 3000-geometry 80x12 + 0 + 180-FG black-BG '# ccccff'-title naming_service- e/proj/xda/ACE + TAO/x.3.1/sun54/ace_wrappers/TAO/orbsvcs/naming_service-O/local/xda4.1/sun54tao/tao_ns.ior-fail 1 </dev null >/dev/null 2> & 1 &"
To start the Naming Service. Note that-o /local/xda4.1/sun54tao/tao_ns.iorArgument specifies the location and name of the Naming Service ior file. To start the IMR activator, type:
/Bin/sh-c "xterm-FN 6x13-Sb-Sl 3000-geometry 80x36 + 0-FG black-BG '# ccccff'-title imr_act- e/proj/xda/ACE + TAO/x.3.1/sun54/ace_wrappers/TAO/orbsvcs/implrepo_service/imr_activator-orbinitref nameservice = file: /// local/xda4.1/sun54tao/tao_ns.ior-orbinitref implreposervice = file: /// local/xda4.1/sun54tao/tao_imr.ior </dev null>/dev/null 2> & 1 &"
. To stop the IMR, IMR activator, and Naming Service, find the processes and kill them or TypeCtrl-cIn the terminals.
- To administer the Tao IMR, you can use$TAO_ROOT/orbsvcs/ImplRepo_Service/tao_imrExecutable (.exe on WINXP). To view a list of registered servers, Type
Tao_imr-orbinitref implreposervice = file: // C:/vc70tao/tao_imr.ior list
Where-ORBInitRefIs an orb argument followied by the Tao IMR ior file. Other argumentstao_imrCan includeremoveAndupdateWith each requiring additional arguments.
Discussion:The built-in ant scripts for starting the Tao IMR, IMR activator, and Naming Service can be run on either the Windows or UNIX platforms as long as Java and ant are installed. note that the Tao IMR and IMR activator are not started when the xdaorb. properties settings are for transient. in all cases, the user must make sure that ace_root and tao_root are set appropriately.