Package javax.naming

Examples of javax.naming.Context.list()


      InitialContext ctx = new InitialContext(env);
      getLog().debug("Created InitialContext");
      Object obj = ctx.lookup("invokers");
      getLog().debug("lookup(invokers) : "+obj);
      Context invokersCtx = (Context) obj;
      NamingEnumeration list = invokersCtx.list("");
      while( list.hasMore() )
      {
         Object entry = list.next();
         getLog().debug(" + "+entry);
      }
View Full Code Here


      InitialContext ctx = new InitialContext(env);
      getLog().debug("Created InitialContext");
      Object obj = ctx.lookup("jmx");
      getLog().debug("lookup(jmx) : "+obj);
      Context jmxCtx = (Context) obj;
      NamingEnumeration list = jmxCtx.list("");
      while( list.hasMore() )
      {
         Object entry = list.next();
         getLog().debug(" + "+entry);
      }
View Full Code Here

      InitialContext ctx = new InitialContext(env);
      getLog().debug("Created InitialContext");
      Object obj = ctx.lookup("jmx");
      getLog().debug("lookup(jmx) : "+obj);
      Context jmxCtx = (Context) obj;
      NamingEnumeration list = jmxCtx.list("");
      while( list.hasMore() )
      {
         Object entry = list.next();
         getLog().debug(" + "+entry);
      }
View Full Code Here

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         NamingEnumeration list = ctx2.list(ObjectBinder.SUBCONTEXT_NAME);
         assertNotNull("NamingEnumeration returned", list);
         assertTrue("NamingEnumeration has entry", list.hasMoreElements());
         NameClassPair pair = (NameClassPair) list.next();
         assertEquals(ObjectBinder.NAME, pair.getName());
      }
View Full Code Here

    ResolveResult r = findContextFor(name);
    Context ctx = (Context) r.getResolvedObj();
    String rname = r.getRemainingName().toString();

    // List the correct Context
    return ctx.list(rname);
  }

  /**
   * Enumerates the names bound in the named context, along with the
   * objects bound to them.
View Full Code Here

        while ( referralException.skipReferral() )
        {
            try
            {
                Context ctx = referralException.getReferralContext();
                ctx.list( "" ); //$NON-NLS-1$
            }
            catch ( NamingException ne )
            {
                if ( ne instanceof ReferralException )
                {
View Full Code Here

      m_evaluators.clear(  );
      NamingEnumeration list = null;
      try
      {
         Context initialContext = new InitialContext(  );
         list = initialContext.list( QUERY_EVALUATOR_CONTEXT );
         NameClassPair       pair      = null;
         ExpressionEvaluator evaluator = null;
         while ( list.hasMore(  ) )
         {
            pair         = (NameClassPair) list.next(  );
View Full Code Here

                while ( re.skipReferral() )
                {
                    try
                    {
                        Context ctx = re.getReferralContext();
                        ctx.list( "" ); //$NON-NLS-1$
                    }
                    catch ( NamingException e1 )
                    {
                        if ( e1 instanceof ReferralException )
                        {
View Full Code Here

        while ( referralException.skipReferral() )
        {
            try
            {
                Context ctx = referralException.getReferralContext();
                ctx.list( "" ); //$NON-NLS-1$
            }
            catch ( NamingException ne )
            {
                if ( ne instanceof ReferralException )
                {
View Full Code Here

    }
    assertTrue("Correct sub subcontext", SimpleNamingContext.class.getName().equals(pairMap.get("sub")));

    Context subContext = (Context) context2.lookup("jdbc/sub");
    Map subPairMap = new HashMap();
    NamingEnumeration subPairEnum = subContext.list("");
    while (subPairEnum.hasMoreElements()) {
      NameClassPair pair = (NameClassPair) subPairEnum.next();
      subPairMap.put(pair.getName(), pair.getClassName());
    }
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.