Package org.omg.CORBA

Examples of org.omg.CORBA.ORB.resolve_initial_references()


    org.omg.CORBA.Object ref = rootpoa.servant_to_reference(bankImpl);
    Bank bankRef = BankHelper.narrow(ref);
    LOG.info("Bank reference created");

    // get the NameService
    org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
    NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
    LOG.info("NamingContext created");

    // bind the Object Reference in Naming
    NameComponent path[] = ncRef.to_name(BANKNAME);
View Full Code Here


            SSLPolicyValueHelper.insert(sslPolicyValue, (sslRequired) ? SSLPolicyValue.SSL_REQUIRED : SSLPolicyValue.SSL_NOT_REQUIRED);
            sslPolicy = null; //orb.create_policy(SSL_POLICY_TYPE.value, sslPolicyValue);
            logger.debug("container's SSL policy: " + sslPolicy);

            // Get the POACurrent object
            poaCurrent = CurrentHelper.narrow(orb.resolve_initial_references("POACurrent"));

            Policy[] policies = {};
            /*
            if (codebasePolicy == null)
                policies = new Policy[]{sslPolicy, csiv2Policy};
View Full Code Here

  public static void main(String[] args) throws Exception {
    // Initialize ORB
    ORB orb = ORB.init(new String[0], null);
    System.out.println("ORB: " + orb.getClass().getName());
   
    POA rootPoa = (POA) orb.resolve_initial_references("RootPOA");
   
    // Create a POA
    Policy[] tpolicy = new Policy[3];
    tpolicy[0] = rootPoa.create_lifespan_policy(
        LifespanPolicyValue.TRANSIENT );
View Full Code Here

                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      final ORB orb = ORB.init(new String[0], System.getProperties());
      POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      IdlInterfaceServant servant = new IdlInterfaceServant();
      org.omg.CORBA.Object original = servant._this_object(orb);
      poa.the_POAManager().activate();
      new Thread(
         new Runnable() {
View Full Code Here

                    getInitialContext().lookup(StatelessSessionHome.JNDI_NAME),
                    StatelessSessionHome.class);
      StatelessSession session = home.create();
      //----------------------------------------------------------------------
      final ORB orb = ORB.init(new String[0], System.getProperties());
      POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
      IdlInterfaceServant servant = new IdlInterfaceServant();
      org.omg.CORBA.Object obj = servant._this_object(orb);
      poa.the_POAManager().activate();
      new Thread(
         new Runnable() {
View Full Code Here

        int serverId = getServerId() ;

        try {
            Activator activator = ActivatorHelper.narrow(
                orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME ));
            activator.active(serverId, serverObj);
        } catch (Exception ex) {
            logTerminal( "exception " + ex.getMessage(),
                REGISTRATION_FAILED ) ;
        }
View Full Code Here

            String[] orbArgs = {"-ORBInitialPort", "5080"};
            ORB orb = ORB.init(orbArgs, null);

            NamingContextExt namingCtx;
            try {
                Object objRef = orb.resolve_initial_references("NameService");
                namingCtx = NamingContextExtHelper.narrow(objRef);
            } catch (Exception ex) {
                System.err.println("ERROR: Failed to resolve Name Service.");
                //System.err.println("Don't forget to run it with:");
                //System.err.println("  tnameserv -ORBInitialPort 5080");
View Full Code Here

                //System.err.println("Don't forget to run it with:");
                //System.err.println("  tnameserv -ORBInitialPort 5080");
                return;
            }

            Object rootPoaRef = orb.resolve_initial_references("RootPOA");
            POA rootPoa = POAHelper.narrow(rootPoaRef);
            rootPoa.the_POAManager().activate();

            SMSGatewayServant smsGateway = new SMSGatewayServant();
            Object smsGatewayRef = rootPoa.servant_to_reference(smsGateway);
View Full Code Here

    args[1] = "NameService=corbaloc::localhost:3528/NameService";
    Properties props = new Properties();
    props.put("org.omg.CORBA.ORBInitialPort", "3528");
    props.put("org.omg.CORBA.ORBInitialHost", "localhost");
    ORB orb = ORB.init(args, props);
    NamingContextExt nc = NamingContextExtHelper.narrow(orb
        .resolve_initial_references("NameService"));
    BindingListHolder bl = new BindingListHolder();
    BindingIteratorHolder blIt = new BindingIteratorHolder();
    nc.list(1000, bl, blIt);
    Binding bindings[] = bl.value;
View Full Code Here

    private CalculatorService calculatorService;
    private TransientNameServer server;

    private void bindObject(String name, org.omg.CORBA.Object object) throws Exception {
        ORB orb = server.getORB();
        org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
        NamingContext ncRef = NamingContextHelper.narrow(objRef);
        NameComponent nc = new NameComponent(name, "");
        NameComponent path[] = {nc};
        ncRef.rebind(path, object);
    }
View Full Code Here

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.