home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fnb101.zip / fnaming.cmd next >
OS/2 REXX Batch file  |  1999-06-28  |  2KB  |  74 lines

  1. extproc python -x %PYTHONHOME%\fnaming.cmd
  2. #############################################################################
  3. # Copyright (C) DSTC Pty Ltd (ACN 052 372 577) 1997, 1998, 1999
  4. # All Rights Reserved.
  5. #
  6. # The software contained on this media is the property of the DSTC Pty
  7. # Ltd.  Use of this software is strictly in accordance with the
  8. # license agreement in the accompanying LICENSE.HTML file.  If your
  9. # distribution of this software does not contain a LICENSE.HTML file
  10. # then you have no rights to use this software in any manner and
  11. # should contact DSTC at the address below to determine an appropriate
  12. # licensing arrangement.
  13. #      DSTC Pty Ltd
  14. #      Level 7, GP South
  15. #      Staff House Road
  16. #      University of Queensland
  17. #      St Lucia, 4072
  18. #      Australia
  19. #      Tel: +61 7 3365 4310
  20. #      Fax: +61 7 3365 4311
  21. #      Email: enquiries@dstc.edu.au
  22. # This software is being provided "AS IS" without warranty of any
  23. # kind.  In no event shall DSTC Pty Ltd be liable for damage of any
  24. # kind arising out of or in connection with the use or performance of
  25. # this software.
  26. #
  27. # Project:      Fnorb
  28. # File:         $Source: /units/arch/src/Fnorb/script/RCS/fnaming,v $
  29. # Version:      @(#)$RCSfile: fnaming,v $ $Revision: 1.4 $
  30. #
  31. #############################################################################
  32. """ A COS Naming service! """
  33.  
  34.  
  35. # Standard/built-in modules.
  36. import sys
  37.  
  38. # Fnorb modules.
  39. from Fnorb.orb import BOA, CORBA
  40.  
  41. # Naming service modules.
  42. from Fnorb.cos.naming import NamingService
  43.  
  44.  
  45. def main(argv):
  46.     """ Do it! """
  47.  
  48.     # Initialise the ORB.
  49.     orb = CORBA.ORB_init(argv, CORBA.ORB_ID)
  50.  
  51.     # The naming service is single-threaded!
  52.     orb._fnorb_override_options({'Threading Model': 'Reactive'})
  53.  
  54.     # Initialise the BOA.
  55.     boa = BOA.BOA_init(argv, BOA.BOA_ID)
  56.  
  57.     # Create the naming service.
  58.     ns = NamingService.NamingService(argv)
  59.  
  60.     # Start the event loop.
  61.     boa._fnorb_mainloop()
  62.  
  63.     return 0
  64.  
  65. #############################################################################
  66.  
  67. if __name__ == '__main__':
  68.     # Do it!
  69.     sys.exit(main(sys.argv[1:]))
  70.  
  71. #############################################################################
  72.