Package org.jacorb.test.bugs.bugjac670

Source Code of org.jacorb.test.bugs.bugjac670.GSLoadBalancerServer

package org.jacorb.test.bugs.bugjac670;

import org.omg.PortableServer.POA;
import org.omg.PortableServer.POAHelper;

public class GSLoadBalancerServer
{
   public static void main( String[] args )
   {
      org.omg.CORBA.ORB orb =  org.omg.CORBA.ORB.init(args, null);

      try
      {
         POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

         GSLoadBalancerImpl servant = new GSLoadBalancerImpl();

         byte[] id = poa.activate_object(servant);
         org.omg.CORBA.Object obj = poa.id_to_reference( id ) ;

         String IOR = orb.object_to_string(obj);

         ((org.jacorb.orb.ORB)orb).addObjectKey("GSLBService", IOR);

         poa.the_POAManager().activate();

         System.out.println ("SERVER IOR: " + IOR);
      }
      catch ( Exception e )
      {
      }

      orb.run();
   }
}
TOP

Related Classes of org.jacorb.test.bugs.bugjac670.GSLoadBalancerServer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.