Package javax.naming

Examples of javax.naming.InitialContext.unbind()


   }
  
   protected void stopService() throws Exception
   {
      InitialContext ctx = new InitialContext();
      ctx.unbind(JNDI_NAME);
      NonSerializableFactory.unbind(JNDI_NAME);
   }
  
   /**
    * @jmx:managed-operation
 
View Full Code Here


         Context initialContext = new InitialContext();

         if (useJNPContext) {
            // Unbind bean home from the JNDI initial context
            try {
               initialContext.unbind(jnpName);
            }
            catch (NamingException namingException) {
               logger.error("Cannot unbind EJBHome from JNDI", namingException);
            }
         }
View Full Code Here

      }
      try
      {
         InitialContext ctx = new InitialContext();
         String homeInvokerName = jndiBinding + "-HomeInvoker";
         ctx.unbind(homeInvokerName);
      }
      catch(Exception ignored)
      {
      }
      try
View Full Code Here

      }
      try
      {
         InitialContext ctx = new InitialContext();
         String beanInvokerName = jndiBinding + "-RemoteInvoker";
         ctx.unbind(beanInvokerName);
      }
      catch(Exception ignored)
      {
      }
View Full Code Here

    private void rebind(String unbindName) throws NamingException
    {
  InitialContext ictx = new InitialContext();
  if (unbindName != null)
      ictx.unbind( unbindName );
 
  if (jndiName != null)
  {
      // Thanks to David D. Kilzer for this code to auto-create
      // subcontext paths!
View Full Code Here

    private void rebind(String unbindName) throws NamingException
    {
  InitialContext ictx = new InitialContext();
  if (unbindName != null)
      ictx.unbind( unbindName );
 
  if (jndiName != null)
  {
      // Thanks to David D. Kilzer for this code to auto-create
      // subcontext paths!
View Full Code Here

    private void stop() {
        String jndiName = getJndiName();
        if (jndiName != null && jndiName.length() > 0) {
            try {
                Context context = new InitialContext();
                context.unbind(jndiName);
                log.info("JavaMail session unbound from " + jndiName);
            } catch (NamingException e) {
                // we tried... this is a common error which occurs during shutdown due to ordering
            }
        }
View Full Code Here

      InitialContext ctx = null;
      try
      {
         ctx = new InitialContext(new Hashtable(environment));
         ctx.unbind(jndiURL);
         RmiConnectorActivator.log(LogService.LOG_DEBUG,"Unbound " + server + " from " + jndiURL, null);
      }
      catch (NamingException x)
      {
         RmiConnectorActivator.log(LogService.LOG_DEBUG,"Cannot unbind server " + server + " to " + jndiURL, x);
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(ctx == null)
         return;
     
      try
      {
         ctx.unbind("java:comp");
      }
      catch (NamingException e)
      {
         log.debug("Failed to unbind 'java:comp'", 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.