Package javax.naming

Examples of javax.naming.Context.list()


        }
        else
        {
            // Perhaps 'name' names a context
            final Context context = lookupSubContext( name );
            return context.list( "" );
        }
    }

    protected abstract NamingEnumeration doLocalList()
        throws NamingException;
View Full Code Here


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

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

    public EntityManagerFactory getPersistenceUnit( String unitName ) {
        EntityManagerFactory factory;
        try {
            Context context = SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext();

            NamingEnumeration<NameClassPair> persUnits = context.list("java:openejb/PersistenceUnit");
            if (persUnits == null)
            {
                throw new CreationException( "No PersistenceUnit found in java:openejb/PersistenceUnit!" );
            }
View Full Code Here

        if (remainingName != null) {
            CannotProceedException cpe = constructCannotProceedException(
                    altName, remainingName);
            Context nnsContext = DirectoryManager.getContinuationContext(cpe);

            result = (NamingEnumeration<T>)nnsContext.list(remainingName);
        } else {
            // do the job
            try {
                Enumeration<ResourceRecord> resEnum = resolver.list(nameToList.toString());
                Hashtable<String, T> entries = new Hashtable<String, T>();
View Full Code Here

        if (object instanceof Context)
        {
            Context ctx = (Context) object;

            return ctx.list("");
        }
        else
        {
            throw new NamingException("binding " + binding + " is not a Context");
        }
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);
            return nns.list(remainingName);
        }

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

      InitialContext ctx = new InitialContext(env);
      getLog().debug("Created InitialContext");
      Object obj = ctx.lookup("jmx");
      getLog().debug("lookup(jmx) : "+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("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("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

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.