Package javax.naming

Examples of javax.naming.InitialContext.unbind()


   public void stop()
   { 
      try
      {
         InitialContext ic = new InitialContext();
         ic.unbind(ctx);
         log.debug("Unbound in JNDI:" + this.beanObject.getClass().getCanonicalName()
               + " in JNDI at " +ctx);
      }
      catch (NamingException e)
      {
View Full Code Here


   {
      InitialContext ic = new InitialContext();

      try
      {
         ic.unbind(SECURITY_MGR_PATH);
      }
      catch(CommunicationException e)
      {
         // Do nothing, the naming services is already stopped
      }
View Full Code Here

  @Override
  public void unbind(String jndiName) {
    InitialContext initialContext = buildInitialContext();
    Name name = parseName( jndiName, initialContext );
    try {
      initialContext.unbind( name );
    }
    catch (Exception e) {
      throw new JndiException( "Error performing unbind [" + name + "]", e );
    }
    finally {
View Full Code Here

   {
      InitialContext ic = new InitialContext();
     
      try
      {
         ic.unbind(SECURITY_MGR_PATH);
      }
      catch(CommunicationException e)
      {
         // Do nothing, the naming services is already stopped
      }
View Full Code Here

            InitialContext ctx = null;
            try
            {
               // the following statement fails when the server is being shut down (07/19/2007)
               ctx = new InitialContext();
               ctx.unbind(jndiName);
            }
            catch (Exception e) {
               log.error("partition unbind operation failed", e);
            }
            finally
View Full Code Here

      if (instance == null)
         return;
      try {
         Properties p = new Properties();
         Context ctx = new InitialContext(p);
         ctx.unbind("java:/TransactionManager");
         ctx.unbind("UserTransaction");
      }
      catch (NamingException e) {
         log.error("unbinding of DummyTransactionManager failed", e);
      }
View Full Code Here

         return;
      try {
         Properties p = new Properties();
         Context ctx = new InitialContext(p);
         ctx.unbind("java:/TransactionManager");
         ctx.unbind("UserTransaction");
      }
      catch (NamingException e) {
         log.error("unbinding of DummyTransactionManager failed", e);
      }
      instance.setTransaction(null);
View Full Code Here

  }

  private void unbind(String jndiName) throws NamingException {
    InitialContext rootCtx = new InitialContext();
    log.debug("unbinding '"+jndiName+"'");
    rootCtx.unbind(jndiName);
    NonSerializableFactory.unbind(jndiName);
  }

  public String getJndiName() {
    return jndiName;
View Full Code Here

         InitialContext ctx = null;
         try
         {
            ctx = new InitialContext(new Hashtable(environment));
            ctx.unbind(jndiURL);
            if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Unbound " + server + " from " + jndiURL);
         }
         catch (NamingException x)
         {
            if (logger.isEnabledFor(Logger.DEBUG)) logger.debug("Cannot unbind server " + server + " to " + jndiURL, x);
View Full Code Here

   {
      if (m_isRunning)
      {
         PortableRemoteObject.unexportObject(this);
         Context ctx = new InitialContext();
         ctx.unbind(IIOP_JNDI_NAME);
         m_isRunning = false;
         System.out.println("My Service Servant stopped successfully");
      }
   }
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.