Examples of listBindings()


Examples of javax.naming.Context.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.Context.listBindings()

    }
    else
    {
      String atom = name.get(0);
      Context context = (Context) bindings.get(atom);
      iter = context.listBindings(name.getSuffix(1));
    }

    return iter;
  }
View Full Code Here

Examples of javax.naming.Context.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.Context.listBindings()

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

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

  /**
   * Destroys the named context and removes it from the namespace.
   * Any attributes associated with the name are also removed.
View Full Code Here

Examples of javax.naming.Context.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()

            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()

    reg.unregister();
   
    ServiceRegistration reg = bc.registerService(className, t, null);
    ServiceRegistration reg2 = bc.registerService(className, t2, null);
   
    NamingEnumeration<Binding> ne = ctx.listBindings("osgi:servicelist/" + className);
   
    assertTrue(ne.hasMoreElements());
   
    Binding bnd = ne.nextElement();
   
View Full Code Here

Examples of javax.naming.InitialContext.listBindings()

   */
  public void listRepositoryBindings() throws NamingException
  {
    InitialContext ctx = new InitialContext();
   
    NamingEnumeration<Binding> serviceList = ctx.listBindings("osgi:service/java.lang.Runnable/(rubbish=smelly)");
   
    Object returnedService = checkThreadRetrievedViaListBindingsMethod(serviceList);
   
    assertFalse("The repository contained more objects than we expected", serviceList.hasMoreElements());
   
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.