Package org.omg.CORBA

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


      for (int ii=0; ii<20; ii++) {
         System.out.println("Hit a key for ORB #" + ii + "/20");
         try { System.in.read(); } catch(java.io.IOException e) {}
         ORB orb = OrbInstanceFactory.createOrbInstance(glob, new String[0], null, new CallbackAddress(glob));
         try {
            POA rootPOA = org.omg.PortableServer.POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            rootPOA.the_POAManager().activate();
         }
         catch (Throwable e) {
            e.printStackTrace();
            System.out.println("ERROR: " + e.toString());
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

        ORB orb = ORB.init( ref, null );

        System.out.println( "corbaloc = " + ref[1] );
        System.out.println( "orb = " + orb );

        org.omg.CORBA.Object obj = orb.resolve_initial_references( name );
        System.out.println( "obj = " + obj );

        Add a = AddHelper.narrow( obj );
        System.out.println( "a = " + a );
View Full Code Here

        String name = "NameService";
        String ref[] = { "-ORBInitRef", getCORBALoc(name) };

        ORB orb = ORB.init( ref, null );

        NamingContext nctx = NamingContextHelper.narrow( orb.resolve_initial_references(name) );
        System.out.println( "nctx = " + nctx );

        if (nctx != null)
        {
            //NameComponent nc = new NameComponent( "RMI:mark.comps.Add:0000000000000000", "mark.comps.Add" );
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 JacORBMessages.MESSAGES.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

    {
        try
        {
            ORB orb = (ORB) container.getComponentInstance(ORB.class);

            return DynAnyFactoryHelper.narrow(orb.resolve_initial_references("DynAnyFactory"));
        } catch (InvalidName e)
        {
            throw new PicoInitializationException("Could not resolve DynAnyFactory", e);
        }
    }
View Full Code Here

        ORB orb = (ORB) container.getComponentInstanceOfType(ORB.class);

        MutablePicoContainer tempContainer = new DefaultPicoContainer(container);
        try
        {
            TimeService timeService = TimeServiceHelper.narrow(orb.resolve_initial_references("TimeService"));
            tempContainer.registerComponent(new CORBAObjectComponentAdapter(TimeService.class, timeService));
        } catch (Exception e)
        {
            // ignored
        }
View Full Code Here

    {
        try
        {
            ORB orb = (ORB) container.getComponentInstance(ORB.class);

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

            return poa;
        } catch (InvalidName e)
        {
            throw new PicoInitializationException("could not resolve RootPOA", e);
View Full Code Here

    {
        try
        {
            ORB orb = (ORB) container.getComponentInstance(ORB.class);

            Repository repository = RepositoryHelper.narrow(orb.resolve_initial_references("InterfaceRepository"));

            return repository;
        }
        catch (InvalidName e)
        {
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.