Package org.omg.CORBA

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


                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

        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

      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

                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

        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 new StartException("Failed to resolve initial reference " + 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

        orbProps.put("org.omg.CORBA.ORBInitialHost", orbInitialHost);
        orbProps.put("org.omg.CORBA.ORBInitialPort", orbInitialPort);
        ORB orb = ORB.init(new String[0], orbProps);

        // Find the object
        NamingContext root = NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
        NameComponent nc = new NameComponent(nameId, nameKind);
        NameComponent[] ncs = {nc};
        org.omg.CORBA.Object corbaObject = root.resolve(ncs);

        Class helperClass = ClassUtils.forName(helperClassName);
View Full Code Here

        description = DESCRIPTIONS[kind-1]

        try
       
            ORB        orb     = org.omg.CORBA.ORB.init(args, null);
            POA        rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            POAManager poaMgr  = rootPOA.the_POAManager();
       
            // create a user defined poa for the foo factory

            org.omg.CORBA.Policy [] policies =
View Full Code Here

            FooFactoryImpl factoryServant = new FooFactoryImpl();
            factoryPOA.activate_object_with_id( new String("FooFactory").getBytes(), factoryServant );
     
            // register factory on name service
            NamingContextExt nc =
                NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));

            nc.bind( nc.to_name("FooFactory.service") , factoryServant._this(orb) );

            // activate the poa manager
            poaMgr.activate();
View Full Code Here

    public static void main(String[] args)
    {
        try
        {     
            ORB        orb     = org.omg.CORBA.ORB.init(args, null);
            POA        rootPOA = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            POAManager poaMgr  = rootPOA.the_POAManager();

            FooFactoryImpl servant   = new FooFactoryImpl();
            FooFactory     reference = servant._this(orb);
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.