Examples of listBindings()


Examples of javax.naming.InitialContext.listBindings()

   
    //Now add a second service
    Thread secondService = new Thread();
    registerService(secondService);
   
    serviceList = ctx.listBindings("osgi:service/java.lang.Runnable/(rubbish=smelly)");
   
    Object returnedService1 = checkThreadRetrievedViaListBindingsMethod(serviceList);
   
    Object returnedService2 = checkThreadRetrievedViaListBindingsMethod(serviceList);
   
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

            Context context = new InitialContext(props);

            assertNameClassPair(context.list(""));
            assertNameClassPair(context.list("ejb"));

            assertBindings(context.listBindings(""));
            assertBindings(context.listBindings("ejb"));

        } finally {
            serviceDaemon.stop();
            OpenEJB.destroy();
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

            assertNameClassPair(context.list(""));
            assertNameClassPair(context.list("ejb"));

            assertBindings(context.listBindings(""));
            assertBindings(context.listBindings("ejb"));

        } finally {
            serviceDaemon.stop();
            OpenEJB.destroy();
        }
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

            PrintWriter out = resp.getWriter();

            try {
                Context ctx = new InitialContext();
                NamingEnumeration<Binding> enm =
                    ctx.listBindings("java:comp/env/list");
                while (enm.hasMore()) {
                    Binding b = enm.next();
                    out.print(b.getObject().getClass().getName());
                }
            } catch (NamingException ne) {
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

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

Examples of javax.naming.InitialContext.listBindings()

   {
      Properties props = new Properties();
      try
      {
         InitialContext ctx = new InitialContext();
         NamingEnumeration bindings = ctx.listBindings("java:comp/env");
         while( bindings.hasMore() )
         {
            Binding binding = (Binding) bindings.next();
            String name = binding.getName();
            String value = binding.getObject().toString();
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

            PrintWriter out = resp.getWriter();

            try {
                Context ctx = new InitialContext();
                NamingEnumeration<Binding> enm =
                    ctx.listBindings("java:comp/env/list");
                while (enm.hasMore()) {
                    Binding b = enm.next();
                    out.print(b.getObject().getClass().getName());
                }
            } catch (NamingException ne) {
View Full Code Here

Examples of javax.naming.directory.DirContext.listBindings()

            assertTrue("WEB-INF entry is a DirContext",
                       webInfEntry instanceof DirContext);
            DirContext webInfContext = (DirContext) webInfEntry;

            // Check the bindings of the WEB-INF context directly
            checkListBindings(webInfContext.listBindings(""), webInfNames);

        } catch (NamingException e) {
            fail("NamingException: " + e);
        }
View Full Code Here

Examples of javax.naming.directory.DirContext.listBindings()

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

        /*
         * there is only one ldap ns
         */
 
View Full Code Here

Examples of javax.naming.directory.DirContext.listBindings()

            assertTrue("WEB-INF entry is a DirContext",
                   webInfEntry instanceof DirContext);
            DirContext webInfContext = (DirContext) webInfEntry;

            // Check the bindings of the WEB-INF context directly
            checkListBindings(webInfContext.listBindings(""), webInfNames);

        } catch (NamingException e) {
            fail("NamingException: " + e);
        }
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.