Package javax.naming

Examples of javax.naming.InitialContext.unbind()


   {
      // Standard JNDI
      Context ctx = new InitialContext();
      ctx.unbind(NAME);
      log.info("Unbound " + NAME + " from " + ctx);
      ctx.unbind(BAD_BINDING);
      log.info("Unbound " + BAD_BINDING + " from " + ctx);
     
      // For some reason creating a context for our own JNDI doesn't work
      // inside the server, so as a hack we directly deal with the NamingServer
      // to bind the object
View Full Code Here


      catch (NameAlreadyBoundException e)
      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
      }
      ctx.createSubcontext("foo/bar");
      ctx.unbind("foo/bar");
      ctx.unbind("foo");
   }

   /** Lookup a name to test basic connectivity and lookup of a known name
    *
 
View Full Code Here

      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
      }
      ctx.createSubcontext("foo/bar");
      ctx.unbind("foo/bar");
      ctx.unbind("foo");
   }

   /** Lookup a name to test basic connectivity and lookup of a known name
    *
    * @throws Exception
View Full Code Here

      catch (NameAlreadyBoundException e)
      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
      }
      ctx.createSubcontext("foo/bar");
      ctx.unbind("foo/bar");
      ctx.unbind("foo");
   }

   /** Lookup a name to test basic connectivity and lookup of a known name
    *
 
View Full Code Here

      {
         getLog().debug("Second createSubcontext(foo) failed as expected");
      }
      ctx.createSubcontext("foo/bar");
      ctx.unbind("foo/bar");
      ctx.unbind("foo");
   }

   /** Lookup a name to test basic connectivity and lookup of a known name
    *
    * @throws Exception
View Full Code Here

      getLog().debug("binding foo/bar");
      ctx.createSubcontext("foo/bar");

      getLog().debug("unbinding foo/bar");
      ctx.unbind("foo/bar");

      getLog().debug("unbinding foo");
      ctx.unbind("foo");

      try
View Full Code Here

      getLog().debug("unbinding foo/bar");
      ctx.unbind("foo/bar");

      getLog().debug("unbinding foo");
      ctx.unbind("foo");

      try
      {
         obj = ctx.lookup("foo");
         fail("lookup(foo) should have thrown an exception");
View Full Code Here

  
   @Override
   protected void stopService() throws Exception
   {
      InitialContext context = new InitialContext();
      context.unbind(jndiName);
      NonSerializableFactory.unbind(jndiName);
   }

   public Connection createConnection() throws JMSException
   {
View Full Code Here

    * @throws Exception for any error
    */
   public void stopService() throws Exception
   {
      Context initialContext = new InitialContext();
      initialContext.unbind(jndiName);
   }

   /**
    * Bind object to jndi.
    *
 
View Full Code Here

       *First create the readonly context using the standard JNDI factory
      */
      InitialContext bootCtx = new InitialContext();
      try
      {
         bootCtx.unbind("readonly");
      }
      catch(NamingException ignore)
      {
      }
      Context readonly = bootCtx.createSubcontext("readonly");
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.