Package javax.naming

Examples of javax.naming.Context.destroySubcontext()


       
        //unbind any NamingEntries that were configured in this webapp's name space
        try
        {
            Context scopeContext = NamingEntryUtil.getContextForScope(getWebAppContext());
            scopeContext.destroySubcontext(NamingEntry.__contextName);
        }
        catch (NameNotFoundException e)
        {
            Log.ignore(e);
            Log.debug("No naming entries configured in environment for webapp "+getWebAppContext());
View Full Code Here


   public void destroy()
   {
      try
      {
         Context context = createContext();
         context.destroySubcontext(JndiUtils.BEAN_MANAGER_GLOBAL_SUBCONTEXT);
      }
      catch (Exception ignore)
      {
      }
   }
View Full Code Here

    try {
      Any param = parameters[0];
      if (param instanceof AnyName) {
        ctx.destroySubcontext((Name)param.toObject());
      } else {
        ctx.destroySubcontext(param.toString());
      }
    } catch (NamingException e) {
      throw context.exception(e);
    }
    return this;
View Full Code Here

    }
    Context ctx = getContext();
    try {
      Any param = parameters[0];
      if (param instanceof AnyName) {
        ctx.destroySubcontext((Name)param.toObject());
      } else {
        ctx.destroySubcontext(param.toString());
      }
    } catch (NamingException e) {
      throw context.exception(e);
View Full Code Here

        }
        finally
        {
            InitialContext ic = new InitialContext();
            Context comp = (Context)ic.lookup("java:comp");
            comp.destroySubcontext("env");
        }
    }

}
View Full Code Here

        }
        final Context namespaceContext = selector.getContext(parsedName.namespace());
        if (namespaceContext == null) {
            throw new NameNotFoundException(name.toString());
        }
        namespaceContext.destroySubcontext(parsedName.remaining());
    }

    public Context createSubcontext(Name name) throws NamingException {
        final ParsedName parsedName = parse(name);
        if (parsedName.namespace() == null || parsedName.namespace().equals("")) {
View Full Code Here

        String[] tokens = parseString(name);
        Context startingContext = getInitialContext();
        startingContext.unbind(name);

        for (int i = tokens.length - 2; i >= 0; i--) {
            startingContext.destroySubcontext(tokens[i]);
        }
    }

    private static String[] parseString(String s) {
        StringTokenizer st = new StringTokenizer(s, "/");
View Full Code Here

                return;
            }

            checkUnbindContext( atom, object );

            context.destroySubcontext( atom );
        }
    }

    protected void checkUnbindContext( final Name name, final Object entry )
        throws NamingException
View Full Code Here

        final ResolveResult resolveResult = getBaseURLContext( name, getRawEnvironment() );
        final Context context = (Context)resolveResult.getResolvedObj();

        try
        {
            context.destroySubcontext( resolveResult.getRemainingName() );
        }
        finally
        {
            context.close();
        }
View Full Code Here

             * multi ns, find next ns context, delegate operation to the next
             * context
             */
            Context nns = findNnsContext(name);
            Name remainingName = name.getSuffix(1);
            nns.destroySubcontext(remainingName);
            return;
        }

        /*
         * there is only one ldap ns
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.