Examples of resolve_initial_references()


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

        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

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

            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

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

                //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

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

    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

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

    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

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

        POA parentPOA = this.parentPOAInjector.getOptionalValue();

        // if an ORB has been injected, we will use the ORB.resolve_initial_references method to instantiate the POA.
        if (orb != null) {
            try {
                this.poa = POAHelper.narrow(orb.resolve_initial_references(this.poaName));
            } catch (Exception e) {
                throw JacORBLogger.ROOT_LOGGER.errorResolvingInitRef(this.poaName, e);
            }
        }
        // if a parent POA has been injected, we use it to create the policies and then the POA itself.
View Full Code Here

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

                Repository ir = iri.getReference();
                homeInterfaceDef = InterfaceDefHelper.narrow(ir.lookup_id(homeRepositoryIds[0]));
            }

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

            // Instantiate home servant, bind it to the servant registry, and create CORBA reference to the EJBHome.
            final EjbCorbaServant homeServant = new EjbCorbaServant(poaCurrent, homeMethodMap, homeRepositoryIds, homeInterfaceDef,
                    orb, homeView.getValue(), factory, configuration, component.getTransactionManager(), module.getClassLoader(), true, securityDomain);
View Full Code Here

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

        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

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

      props.put("org.omg.CORBA.ORBInitialHost", "stolas69.servequake.com");
      //props.setProperty("org.omg.CORBA.ORBInitialPort", "900");
      //props.setProperty("org.omg.CORBA.ORBInitialHost",  "stolas69.servequake.com");
      String[] args = new String[0];
      ORB orb = ORB.init(args, props);
      org.omg.CORBA.Object object = orb
          .resolve_initial_references("NameService");
      NamingContextExt nc = NamingContextExtHelper.narrow(object);
      org.omg.CORBA.Object adm = nc.resolve_str("admin");
      items = AdminHelper.narrow(adm);
      product[] products = new product[items.getProducts().length];
View Full Code Here

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

                Repository ir = iri.getReference();
                homeInterfaceDef = InterfaceDefHelper.narrow(ir.lookup_id(homeRepositoryIds[0]));
            }

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

            // Instantiate home servant, bind it to the servant registry, and create CORBA reference to the EJBHome.
            final EjbCorbaServant homeServant = new EjbCorbaServant(poaCurrent, homeMethodMap, homeRepositoryIds, homeInterfaceDef,
                    orb, homeView.getValue(), factory, configuration, component.getTransactionManager(), module.getClassLoader(), true, securityDomain);
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.