74. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/25/2018 2:13:01 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

74.1 Files compared

# Location File Last Modified
1 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\corba\se\impl\naming\cosnaming TransientNameServer.java Mon Jan 22 14:46:40 2018 UTC
2 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\corba\se\impl\naming\cosnaming TransientNameServer.java Wed Sep 12 16:19:01 2018 UTC

74.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 468
Changed 2 4
Inserted 0 0
Removed 0 0

74.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

74.4 Active regular expressions

No regular expressions were active.

74.5 Comparison detail

  1   /*
  2    * Copyrig ht (c) 199 7, 2003, O racle and/ or its aff iliates. A ll rights  reserved.
  3    * DO NOT  ALTER OR R EMOVE COPY RIGHT NOTI CES OR THI S FILE HEA DER.
  4    *
  5    * This co de is free  software;  you can r edistribut e it and/o r modify i t
  6    * under t he terms o f the GNU  General Pu blic Licen se version  2 only, a s
  7    * publish ed by the  Free Softw are Founda tion.  Ora cle design ates this
  8    * particu lar file a s subject  to the "Cl asspath" e xception a s provided
  9    * by Orac le in the  LICENSE fi le that ac companied  this code.
  10    *
  11    * This co de is dist ributed in  the hope  that it wi ll be usef ul, but WI THOUT
  12    * ANY WAR RANTY; wit hout even  the implie d warranty  of MERCHA NTABILITY  or
  13    * FITNESS  FOR A PAR TICULAR PU RPOSE.  Se e the GNU  General Pu blic Licen se
  14    * version  2 for mor e details  (a copy is  included  in the LIC ENSE file  that
  15    * accompa nied this  code).
  16    *
  17    * You sho uld have r eceived a  copy of th e GNU Gene ral Public  License v ersion
  18    * 2 along  with this  work; if  not, write  to the Fr ee Softwar e Foundati on,
  19    * Inc., 5 1 Franklin  St, Fifth  Floor, Bo ston, MA 0 2110-1301  USA.
  20    *
  21    * Please  contact Or acle, 500  Oracle Par kway, Redw ood Shores , CA 94065  USA
  22    * or visi t www.orac le.com if  you need a dditional  informatio n or have  any
  23    * questio ns.
  24    */
  25  
  26   package co m.sun.corb a.se.impl. naming.cos naming;
  27  
  28   import jav a.util.Pro perties;
  29   import jav a.net.Inet Address;
  30  
  31   import org .omg.CORBA .ORB;
  32  
  33   import org .omg.CosNa ming.Namin gContext;
  34  
  35   import com .sun.corba .se.spi.lo gging.CORB ALogDomain s;
  36  
  37   import com .sun.corba .se.impl.n aming.cosn aming.Tran sientNameS ervice;
  38  
  39   import com .sun.corba .se.impl.o rbutil.ORB Constants;
  40   import com .sun.corba .se.impl.o rbutil.Cor baResource Util;
  41   import com .sun.corba .se.impl.l ogging.Nam ingSystemE xception;
  42  
  43   /**
  44    * Class T ransientNa meServer i s a standa lone appli cation whi ch
  45    * impleme nts a tran sient name  service.  It uses th e Transien tNameServi ce
  46    * class f or the nam e service  implementa tion, and  the Bootst rapServer
  47    * for imp lementing  bootstrapp ing, i.e.,  to get th e initial  NamingCont ext.
  48    * <p>
  49    * The Boo tstrapServ er uses a  Properties  object sp ecify the  initial se rvice
  50    * object  references  supported ; such as  Properties  object is  created c ontaining
  51    * only a  "NameServi ce" entry  together w ith the st ringified  object ref erence
  52    * for the  initial N amingConte xt. The Bo otstrapSer ver's list ening port
  53    * is set  by first c hecking th e supplied  arguments  to the na me server
  54    * (-ORBIn itialPort) , and if n ot set, de faults to  the standa rd port nu mber.
  55    * The Boo tstrapServ er is crea ted supply ing the Pr operties o bject, usi ng no
  56    * externa l File obj ect for st orage, and  the deriv ed initial  port numb er.
  57    * @see Tr ansientNam eService
  58    * @see Bo otstrapSer ver
  59    */
  60   public cla ss Transie ntNameServ er
  61   {
  62       static  private b oolean deb ug = false  ;
  63       static  NamingSys temExcepti on wrapper  = NamingS ystemExcep tion.get(
  64           CO RBALogDoma ins.NAMING  ) ;
  65  
  66       static  public vo id trace(  String msg  ) {
  67           if  (debug)
  68                System.o ut.println ( msg ) ;
  69       }
  70  
  71       static  public vo id initDeb ug( String [] args )  {
  72           //  If debug  was compil ed to be t rue for te sting purp oses,
  73           //  don't cha nge it.
  74           if  (debug)
  75                return ;
  76  
  77           fo r (int ctr =0; ctr<ar gs.length;  ctr++)
  78                if (args [ctr].equa lsIgnoreCa se( "-debu g" )) {
  79                    debu g = true ;
  80                return ;
  81           }
  82           de bug = fals e ;
  83       }
  84  
  85       privat e static o rg.omg.COR BA.Object  initialize RootNaming Context( O RB orb ) {
  86           or g.omg.CORB A.Object r ootContext  = null;
  87           tr y {
  88                com.sun. corba.se.s pi.orb.ORB  coreORB =
  89                    (com .sun.corba .se.spi.or b.ORB)orb  ;
  90  
  91                Transien tNameServi ce tns = n ew Transie ntNameServ ice(coreOR B );
  92                return t ns.initial NamingCont ext();
  93           }  catch (org .omg.CORBA .SystemExc eption e)  {
  94                throw wr apper.tran sNsCannotC reateIniti alNcSys( e  ) ;
  95           }  catch (Exc eption e)  {
  96                throw wr apper.tran sNsCannotC reateIniti alNc( e )  ;
  97           }
  98       }
  99  
  100       /**
  101        * Mai n startup  routine. I t instanti ates a Tra nsientName Service
  102        * obj ect and a  BootstrapS erver obje ct, and th en allows  invocation s to
  103        * hap pen.
  104        * @pa ram args a n array of  strings r epresentin g the star tup argume nts.
  105        */
  106       public  static vo id main(St ring args[ ]) {
  107           in itDebug( a rgs ) ;
  108  
  109           bo olean inva lidHostOpt ion = fals e;
  110           bo olean orbI nitialPort 0 = false;
  111  
  112           //  Determine  the initi al bootstr ap port to  use
  113             int initia lP ORT      
;
  114           tr y {
  115                trace( " Transient  name serve r started  with args  " + args )  ;
  116  
  117                // Creat e an ORB o bject
  118                Properti es props =  System.ge tPropertie s() ;
  119  
  120                props.pu t( ORBCons tants.SERV ER_ID_PROP ERTY, ORBC onstants.N AME_SERVIC E_SERVER_I D ) ;
  121                props.pu t( "org.om g.CORBA.OR BClass",
  122                    "com .sun.corba .se.impl.o rb.ORBImpl " );
  123  
  124                try {
  125                    // T ry environ ment
  126                    Stri ng ips = S ystem.getP roperty( O RBConstant s.INITIAL_ PORT_PROPE RTY ) ;
  127                    if ( ips != nul l && ips.l ength() >  0 ) {
  128                         initialPor t = java.l ang.Intege r.parseInt (ips);
  129                          // -Dorg.o mg.CORBA.O RBInitialP ORT      is invalid
  130                         if( initia lPort == 0  ) {
  131                             orbIni tialPort0  = true;
  132                             throw  wrapper.tr ansientNam eServerBad Port() ;
  133                         }
  134                    }
  135                    Stri ng hostNam e =
  136                         System.get Property(  ORBConstan ts.INITIAL _HOST_PROP ERTY ) ;
  137                    if(  hostName ! = null ) {
  138                         invalidHos tOption =  true;
  139                         throw wrap per.transi entNameSer verBadHost () ;
  140                    }
  141                } catch  (java.lang .NumberFor matExcepti on e) {
  142                    // d o nothing
  143                }
  144  
  145                // Let a rguments o verride
  146                for (int  i=0;i<arg s.length;i ++) {
  147                    // W as the ini tial port  specified?
  148                    if ( args[i].eq uals("-ORB InitialPor t") &&
  149                         i < args.l ength-1) {
  150                         initialPor t = java.l ang.Intege r.parseInt (args[i+1] );
  151                         // -ORBIni tialPort 0  is invali d
  152                         if( initia lPort == 0  ) {
  153                             orbIni tialPort0  = true;
  154                             throw  wrapper.tr ansientNam eServerBad Port() ;
  155                         }
  156                    }
  157                    if ( args[i].eq uals("-ORB InitialHos t" ) ) {
  158                         invalidHos tOption =  true;
  159                         throw wrap per.transi entNameSer verBadHost () ;
  160                    }
  161                }
  162  
  163                // If in itialPort  is not set , then we  need to se t the Defa ult
  164                // Initi al Port Pr operty for  the ORB
  165                if( init ialPort ==  0 ) {
  166                    init ialPort =  ORBConstan ts.DEFAULT _INITIAL_P ORT;
  167                    prop s.put( ORB Constants. INITIAL_PO RT_PROPERT Y,
  168                         java.lang. Integer.to String(ini tialPort)  );
  169                }
  170  
  171                // Set - ORBInitial Port = Per sistent Se rver Port  so that OR BImpl
  172                // will  start Boot  Strap.
  173                props.pu t( ORBCons tants.PERS ISTENT_SER VER_PORT_P ROPERTY,
  174                   java. lang.Integ er.toStrin g(initialP ort) );
  175  
  176                org.omg. CORBA.ORB  corb = ORB .init( arg s, props )  ;
  177                trace( " ORB object  returned  from init:  " + corb  ) ;
  178  
  179                org.omg. CORBA.Obje ct ns = in itializeRo otNamingCo ntext( cor b ) ;
  180                ((com.su n.corba.se .org.omg.C ORBA.ORB)c orb).regis ter_initia l_referenc e(
  181                    "Nam ingService ", ns ) ;
  182  
  183                String s tringified IOR = null ;
  184  
  185                if( ns ! = null ) {
  186                    stri ngifiedIOR  = corb.ob ject_to_st ring(ns) ;
  187                } else {
  188                     Nam ingUtils.e rrprint(Co rbaResourc eUtil.getT ext(
  189                          "tnameser v.exceptio n", initia lPort));
  190                     Nam ingUtils.e rrprint(Co rbaResourc eUtil.getT ext(
  191                          "tnameser v.usage")) ;
  192                    Syst em.exit( 1  );
  193                }
  194  
  195                trace( " name servi ce created " ) ;
  196  
  197                // This  is used fo r handshak ing by the  IBM test  framework!
  198                // Do no t modify,  unless ano ther synch ronization  protocol  is
  199                // used  to replace  this hack !
  200  
  201                System.o ut.println (CorbaReso urceUtil.g etText(
  202                    "tna meserv.hs1 ", stringi fiedIOR));
  203                System.o ut.println (CorbaReso urceUtil.g etText(
  204                    "tna meserv.hs2 ", initial Port));
  205                System.o ut.println (CorbaReso urceUtil.g etText("tn ameserv.hs 3"));
  206  
  207                // Serve  objects.
  208                java.lan g.Object s ync = new  java.lang. Object();
  209                synchron ized (sync ) {sync.wa it();}
  210           }  catch (Exc eption e)  {
  211                if( inva lidHostOpt ion ) {
  212                    // L et the Use r Know tha t -ORBInit ialHost is  not valid  for
  213                    // t nameserver
  214                    Nami ngUtils.er rprint( Co rbaResourc eUtil.getT ext(
  215                         "tnameserv .invalidho stoption"  ) );
  216                } else i f( orbInit ialPort0 )  {
  217                    // L et the Use r Know tha t -ORBInit ialPort 0  is not val id for
  218                    // t nameserver
  219                    Nami ngUtils.er rprint( Co rbaResourc eUtil.getT ext(
  220                         "tnameserv .orbinitia lport0" )) ;
  221                } else {
  222                    Nami ngUtils.er rprint(Cor baResource Util.getTe xt(
  223                         "tnameserv .exception ", initial Port));
  224                    Nami ngUtils.er rprint(Cor baResource Util.getTe xt(
  225                         "tnameserv .usage"));
  226                }
  227  
  228                e.printS tackTrace( ) ;
  229           }
  230       }
  231  
  232       /**
  233        * Pri vate const ructor sin ce no obje ct of this  type shou ld be inst antiated.
  234        */
  235       privat e Transien tNameServe r() {}
  236   }