Examples of NamingContext


Examples of org.omg.CosNaming.NamingContext

     * @param obj     the CORBA object to be bound.
     * @throws Exception if an error occurs while binding the object.
     */
    public static synchronized void rebind(final NamingContextExt ctx, final String strName, final org.omg.CORBA.Object obj) throws Exception {
        final NameComponent[] name = ctx.to_name(strName);
        NamingContext intermediateCtx = ctx;

        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

Examples of org.omg.CosNaming.NamingContext

            }

        } else if (e instanceof CannotProceed) {

            ne = new CannotProceedException();
            NamingContext nc = ((CannotProceed) e).cxt;
            NameComponent[] rest = ((CannotProceed) e).rest_of_name;

            // %%% We assume that rest returns *all* unprocessed components.
            // Don't' know if that is a good assumption, given
            // NotFound doesn't set rest as expected. -RL
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

    java.lang.Object callResolve(NameComponent[] path)
            throws NamingException {
        try {
            org.omg.CORBA.Object obj = _nc.resolve(path);
            try {
                NamingContext nc = NamingContextHelper.narrow(obj);
                if (nc != null) {
                    return new CNCtx(_orb, nc, _env, makeFullName(path));
                } else {
                    return obj;
                }
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

                // Use naming context object reference
                obj = ((CNCtx) obj)._nc;
            }

            if (obj instanceof org.omg.CosNaming.NamingContext) {
                NamingContext nobj = NamingContextHelper.narrow((org.omg.CORBA.Object) obj);
                if (rebind)
                    _nc.rebind_context(pth, nobj);
                else
                    _nc.bind_context(pth, nobj);
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

     */
    public void destroySubcontext(Name name)
            throws NamingException {
        if (_nc == null)
            throw JacORBMessages.MESSAGES.notANamingContext(name.toString());
        NamingContext the_nc = _nc;
        NameComponent[] path = org.jboss.as.jacorb.naming.jndi.CNNameParser.nameToCosName(name);
        if (name.size() > 0) {
            try {
                javax.naming.Context ctx =
                        (javax.naming.Context) callResolve(path);
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

    private javax.naming.Context callBindNewContext(NameComponent[] path)
            throws NamingException {
        if (_nc == null)
            throw JacORBMessages.MESSAGES.notANamingContext(path.toString());
        try {
            NamingContext nctx = _nc.bind_new_context(path);
            return new CNCtx(_orb, nctx, _env, makeFullName(path));
        } catch (Exception e) {
            throw org.jboss.as.jacorb.naming.jndi.ExceptionMapper.mapException(e, this, path);
        }
    }
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

        // do we need to push through to a deeper naming context first?
        if (n.length > 1) {
            // resolve the top level name to a context, and have that context
            // 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.
            context.bind(subName, obj);
        }
        else {
            NameComponent name = n[0];
            // we need the resolveObject() and bindObject() calls to be consistent, so
            // synchronize on this
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

        // do we need to push through to a deeper naming context first?
        if (n.length > 1) {
            // resolve the top level name to a context, and have that context
            // 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.
            context.rebind(subName, obj);
        }
        else {
            NameComponent name = n[0];
            // we need the resolveObject() and bindObject() calls to be consistent, so
            // synchronize on this
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

        // do we need to push through to a deeper naming context first?
        if (n.length > 1) {
            // resolve the top level name to a context, and have that context
            // 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.
            context.bind_context(subName, nc);
        }
        else {
            NameComponent name = n[0];
            // we need the resolveObject() and bindObject() calls to be consistent, so
            // synchronize on this
View Full Code Here

Examples of org.omg.CosNaming.NamingContext

        // do we need to push through to a deeper naming context first?
        if (n.length > 1) {
            // resolve the top level name to a context, and have that context
            // 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.
            context.rebind_context(subName, nc);
        }
        else {
            NameComponent name = n[0];
            // we need the resolveObject() and bindObject() calls to be consistent, so
            // synchronize on this
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.