Package javax.naming

Examples of javax.naming.InitialContext.unbind()


   public void stop() throws Exception
   {
      if (m_running)
      {
         InitialContext ctx = new InitialContext();
         ctx.unbind(JNDI_NAME);
         UnicastRemoteObject.unexportObject(this, false);
         m_running = false;
         System.out.println("My remote service stopped successfully");
      }
   }
View Full Code Here


   {
      InitialContext ctx = null;
      try
      {
         ctx = new InitialContext();
         ctx.unbind(name);
         NonSerializableFactory.unbind(name);
      }
      catch (NamingException e)
      {
         log.warn("Unable to unbind BeanFactory from JNDI", e);
View Full Code Here

   {
      InitialContext ctx = null;
      try
      {
         ctx = new InitialContext();
         ctx.unbind(name);
         NonSerializableFactory.unbind(name);
      }
      catch (NamingException e)
      {
         throw new FatalBeanException("Unable to unbind BeanFactory from JNDI", e);
View Full Code Here

         InitialContext ctx = null;
         try
         {
            ctx = new InitialContext(new Hashtable(environment));
            ctx.unbind(jndiPath);
         }
         catch(NamingException ne)
         {
            log.error("Error unbinding rmi connector stub", ne);
         }
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

      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

   }
   protected void stopService() throws Exception
   {
      InitialContext ctx = new InitialContext();
      NonSerializableFactory.unbind(jndiName);
      ctx.unbind(jndiName);
      log.debug("Unbound SRPVerifierStore at "+jndiName);
   }

   public VerifierInfo getUserVerifier(String username) throws KeyException, IOException
   {
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.