Package org.omg.CosNaming

Examples of org.omg.CosNaming.NamingContext.resolve()


        // bind the Object Reference in Naming
       
        NameComponent nc = new NameComponent(serviceName, kind);
        NameComponent path[] = {nc};

        objRef = ncRef.resolve(path);
    }
    catch (SystemException ex)
    {
        throw ex;
    }
View Full Code Here


            }

            final NamingContext nctx = NamingContextHelper.narrow(objref);
            final NameComponent[] path =
                { new NameComponent("SerialContextProvider", "") };
            final org.omg.CORBA.Object obj = nctx.resolve(path) ;

            SerialContextProvider result =
                (SerialContextProvider)PortableRemoteObject.narrow( obj,
                    SerialContextProvider.class );
View Full Code Here

        for (int i = 0; i < name.length - 1; i++) {
            final NameComponent[] relativeName = new NameComponent[]{name[i]};
            try {
                intermediateCtx = NamingContextHelper.narrow(
                        intermediateCtx.resolve(relativeName));
            } catch (NotFound e) {
                intermediateCtx = intermediateCtx.bind_new_context(relativeName);
            }
        }
        intermediateCtx.rebind(new NameComponent[]{name[name.length - 1]}, obj);
View Full Code Here

        // 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);
        // Narrow the object reference
        Method narrowMethod = helperClass.getMethod("narrow", new Class[] {org.omg.CORBA.Object.class});
        Object targetObject = narrowMethod.invoke(null, new Object[] {corbaObject});
View Full Code Here

/* 848 */     NamingContext intermediateCtx = ctx;
/*     */
/* 850 */     for (int i = 0; i < name.length - 1; i++) {
/* 851 */       NameComponent[] relativeName = { name[i] };
/*     */       try {
/* 853 */         intermediateCtx = NamingContextHelper.narrow(intermediateCtx.resolve(relativeName));
/*     */       }
/*     */       catch (NotFound e)
/*     */       {
/* 857 */         intermediateCtx = intermediateCtx.bind_new_context(relativeName);
/*     */       }
View Full Code Here

/* 216 */     NamingContext intermediateCtx = ctx;
/*     */
/* 218 */     for (int i = 0; i < name.length - 1; i++) {
/* 219 */       NameComponent[] relativeName = { name[i] };
/*     */       try {
/* 221 */         intermediateCtx = NamingContextHelper.narrow(intermediateCtx.resolve(relativeName));
/*     */       }
/*     */       catch (NotFound e)
/*     */       {
/* 225 */         intermediateCtx = intermediateCtx.bind_new_context(relativeName);
/*     */       }
View Full Code Here

                NameComponent[] nc = new NameComponent[1];
                int lastComponent = nameComponent.length - 1;
                for (int j = 0; j < lastComponent; ++j) {
                    nc[0] = nameComponent[j];
                    try {
                        currentContext = NamingContextHelper.narrow(currentContext.resolve(nc));
                    } catch (NotFound nf) {
                        currentContext = currentContext.bind_new_context(nc);
                    }
                }
                nc[0] = nameComponent[lastComponent];
View Full Code Here

            }

            final NamingContext nctx = NamingContextHelper.narrow(objref);
            final NameComponent[] path =
                { new NameComponent("SerialContextProvider", "") };
            final org.omg.CORBA.Object obj = nctx.resolve(path) ;

            SerialContextProvider result =
                (SerialContextProvider)PortableRemoteObject.narrow( obj,
                    SerialContextProvider.class );
View Full Code Here

      {
         for (int i = 1; i < length; i++)
         {
            node = (DefaultMutableTreeNode)path.getPathComponent (i);
            ContextNode bind = (ContextNode)node.getUserObject ();
            context = NamingContextHelper.narrow (context.resolve (bind.getName ()));
            if (context == null)
            {
               System.err.println ("Naming context narrow failed!");
               System.exit (1);
            }
View Full Code Here

      {
         for (int i = 1; i < length; i++)
         {
            node = (DefaultMutableTreeNode)path.getPathComponent (i);
            ContextNode bind = (ContextNode)node.getUserObject ();
            context = NamingContextHelper.narrow (context.resolve (bind.getName ()));
            if (context == null)
            {
               System.err.println ("Naming context narrow failed!");
               System.exit (1);
            }
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.