Package org.omg.CosNaming

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


            // resolve the rest.
            NamingContext context = resolveContext(n[0]);
            NameComponent[] subName = extractSubName(n);

            // now pass this along to the next context for the real bind operation.
            return context.resolve(subName);
        } else {
            NameComponent name = n[0];
            // see if we have this bound already...can't replace these.
            BindingTypeHolder type = new BindingTypeHolder();
            org.omg.CORBA.Object obj = resolveObject(name, type);
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

                       throws Exception {

        NamingContext nctx = NamingContextHelper.narrow(ref);
  NameComponent[] path = { new NameComponent("SerialContextProvider", "") };
  return (SerialContextProvider)
        PortableRemoteObject.narrow(nctx.resolve(path),
            SerialContextProvider.class);
    }


    private SerialContextProvider getProvider()
View Full Code Here

      NameComponent nComp = new NameComponent(rmiObj, "");
      NameComponent path[] = {nComp};
      try {
        // resolve and narrow to RMI object
        obj = nc.resolve(path);
        HelloWorld hi = HelloWorldHelper.narrow(obj);

        // call method on RMI object
        hi.sayHello();
        System.out.println("Method call completed successfully!");
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

                // most of the time unless there are federated naming contexts.
                Servant servant = impl.getNSPOA().reference_to_servant(
                    context );
                return doResolve(((NamingContextDataStore)servant), tail) ;
            } catch( Exception e ) {
                return context.resolve(tail);
            }
        }
    }

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

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

            NamingContext namingCtx = getNamingContext(orb, details.getNameService());
            for (int i = 0; i < details.getNamePath().size() - 1; i++) {
                NameComponent nc = new NameComponent(details.getNamePath().get(i), "");
                NameComponent[] path = new NameComponent[] {nc};
                try {
                    namingCtx = NamingContextHelper.narrow(namingCtx.resolve(path));
                } catch (Exception e) {
                    namingCtx = namingCtx.bind_new_context(path);
                }
            }
            NameComponent finalName =
View Full Code Here

                }
            }
            NameComponent finalName =
                new NameComponent(details.getNamePath().get(details.getNamePath().size() - 1), "");
            try {
                namingCtx.resolve(new NameComponent[] {finalName});
                // no exception means that some object is already registered
                // under this name, we need to crash here
                throw new CorbaHostException(CorbaHostException.BINDING_IN_USE);
            } catch (NotFound e) {
                namingCtx.bind(new NameComponent[] {finalName}, servantObject);
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.