Examples of NameComponent


Examples of org.omg.CosNaming.NameComponent

    private void bindServant(DynaCorbaServant servant, String name) {
        try {
            Object nameService = orb.resolve_initial_references("NameService");
            NamingContext namingContext = NamingContextHelper.narrow(nameService);

            NameComponent nc = new NameComponent(name, "");
            NameComponent[] path = new NameComponent[] {nc};
            namingContext.rebind(path, servant);
        } catch (Exception e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

     */
    private org.omg.CORBA.Object bindReference(String name) {
        try {
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(name, "");
            NameComponent path[] = {nc};
            return ncRef.resolve(path);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

            ArraysUnionsServant arraysUnions = new ArraysUnionsServant();

            orb.connect(singleSetter);
            orb.connect(arraysSetter);

            NameComponent nc;
            NameComponent[] path;

            nc = new NameComponent("PrimitivesSetter", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, singleSetter);

            nc = new NameComponent("ArraysSetter", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, arraysSetter);

            nc = new NameComponent("TestObject", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, complexObject);

            nc = new NameComponent("CalcObject", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, calcObject);

            nc = new NameComponent("ObjectManager", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, objectManager);

            nc = new NameComponent("EnumManager", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, enumManager);

            nc = new NameComponent("ArraysUnions", "");
            path = new NameComponent[] {nc};
            namingContext.rebind(path, arraysUnions);

            NamingContextExt nce = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

            else
            {
                NamingContextExt nc =
        NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
                NameComponent [] name = new NameComponent[1];
                name[0] = new NameComponent( "TransactionService", "service");
                nc.bind(name, transactionService.get_reference());
            }
            if (logger.isInfoEnabled())
                logger.info("TransactionService up");
        }
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

        try
        {
            NamingContextExt nc =
                NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));
            NameComponent [] name = new NameComponent[1];
            name[0] = new NameComponent( "TransactionService", "service");
            factory = TransactionFactoryHelper.narrow(nc.resolve(name));   
        }
        catch (Exception e)
        {
            if (logger.isErrorEnabled())
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

            org.omg.CORBA.Object oref = poa.servant_to_reference(impl);
            ref = org.omg.dds.DomainParticipantHelper.narrow(oref);

            if (ncRef != null) {
                // bind the Object Reference in Naming
                NameComponent path[] = ncRef.to_name(new Integer(domainId)
                        .toString());
                ncRef.rebind(path, ref);
                allParticipant.add(ref);
                Consummer.add(ref);
            }
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

                // Use NamingContextExt which is part of the Interoperable
                // Naming Service (INS) specification.
                NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
                String id = new Integer(a_participant.get_domain_id())
                        .toString();
                NameComponent path[] = ncRef.to_name(id);
                ncRef.unbind(path);
            } else {
                return RETCODE_PRECONDITION_NOT_MET.value;
            }
        } catch (Exception e) {
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

            return;
        }

        namingContext_ = NamingContextHelper.narrow(getORB().resolve_initial_references("NameService"));

        NameComponent[] _name = new NameComponent[] { new NameComponent(nameId, nameKind) };

        if (logger_.isInfoEnabled())
        {
            logger_.info("namingContext.rebind(" + format(_name) + " => " + getCorbaLoc() + ")");
        }
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

        contexts[i].setNode(node);
        node.setUserObject(contexts[i]);
        node.setAllowsChildren(true);
        model.insertNodeInto(node,myDefaultNode,0);
    }
    NameComponent last =
                    contexts[i].binding.binding_name[ contexts[i].binding.binding_name.length-1];
    NameComponent[] ncs = {last};

    org.jacorb.orb.ParsedIOR pior = null;
    try
    {
        pior =
                        ((org.jacorb.orb.Delegate)((org.omg.CORBA.portable.ObjectImpl)context.resolve(
                                  ncs ))._get_delegate()).getParsedIOR();
    }
    catch( org.omg.CosNaming.NamingContextPackage.NotFound nf )
    {
        // the named object could have disappeared from the
        // naming context in the meantime. If it has, we simply
        // continue
        continue;
    }
    Vector row = createRow(last, pior);
    bindingData.addElement( row );

      }
 
 
      for( int i = 0; i < objects.length; i++ )
      {
    NameComponent last =
                    objects[i].binding_name[ objects[i].binding_name.length-1];
    NameComponent[] ncs = {last};
    org.jacorb.orb.ParsedIOR pior = null;
    try
    {
View Full Code Here

Examples of org.omg.CosNaming.NameComponent

        if( obj == null )
            throw new org.omg.CORBA.BAD_PARAM();

        Name n = new Name( nc );
        Name ctx = n.ctxName();
        NameComponent nb = n.baseNameComponent();
        if( ctx == null )
        {
            if( names.containsKey( n ))
            {
                // if the name is still in use, try to ping the 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.