Package javax.naming

Examples of javax.naming.Context.rebind()


      }

      log.debug("atom: " + atom);
      log.debug("link: " + link);
     
      fromCtx.rebind(atom, link);

      log.debug("Bound link " + fromName + " to " + toName);
   }
  
   /**
 
View Full Code Here


      so that any lookup against java:/jaas/domain returns an instance of our
      security manager class.
      */
     RefAddr refAddr = new StringRefAddr("nns", "JSM");
     Reference ref = new Reference("javax.naming.Context", refAddr, factoryName, null);
     ctx.rebind(this.baseContext, ref);
   }
}
View Full Code Here

      parser = ctx.getNameParser("");

      RefAddr refAddr = new StringRefAddr("nns", "JSMCachePolicy");
      String factoryName = DefaultCacheObjectFactory.class.getName();
      Reference ref = new Reference("javax.naming.Context", refAddr, factoryName, null);
      ctx.rebind(DEFAULT_CACHE_POLICY_PATH, ref);
      log.debug("cachePolicyCtxPath="+cacheJndiName);

      // Bind the default SecurityProxyFactory instance under java:/SecurityProxyFactory
      SecurityProxyFactory proxyFactory = (SecurityProxyFactory) securityProxyFactoryClass.newInstance();
      ctx.bind("java:/SecurityProxyFactory", proxyFactory);
View Full Code Here

   }

   private void establishPolicyRegistration() throws Exception
   {
      Context ctx = new InitialContext();
      ctx.rebind(this.policyRegistrationContextName, this.policyRegistration);
   }
  
   private void establishSecurityManagement() throws Exception
   {
      Context ctx = new InitialContext();
View Full Code Here

   }
  
   private void establishSecurityManagement() throws Exception
   {
      Context ctx = new InitialContext();
      ctx.rebind(this.securityManagementContextName, this.securityManagement);
   }
}
View Full Code Here

         name = jndiName.substring(idx + 1);
      }
      boolean failed = false;
      try
      {
         context.rebind(name, o);
      }
      catch (Exception ignored)
      {
         failed = true;
      }
View Full Code Here

         else
         {
            jbDest = new JBossTopic(destination.getName());
         }
        
         c.rebind(jndiNameInContext, jbDest);        
      }
           
      if (destination.isQueue())
      {
         queueMap.put(destination.getName(), destination);
View Full Code Here

         name = jndiName.substring(idx + 1);
      }
      boolean failed=false;
      try
      {
         context.rebind(name,o);
      }
      catch (Exception ignored)
      {
         failed=true;
      }
View Full Code Here

        }
        final Context namespaceContext = selector.getContext(parsedName.namespace());
        if (namespaceContext == null) {
            throw new NameNotFoundException(name.toString());
        }
        namespaceContext.rebind(parsedName.remaining(), object);
    }

    public void unbind(Name name) throws NamingException {
        final ParsedName parsedName = parse(name);
        if (parsedName.namespace() == null || parsedName.namespace().equals("")) {
View Full Code Here

     */
    public static void rebind(final Context ctx, final Name name, final Object value) throws NamingException {
       final int size = name.size();
       final String atom = name.get(size - 1);
       final Context parentCtx = createSubcontext(ctx, name.getPrefix(size - 1));
       parentCtx.rebind(atom, value);
    }

    /**
     * Unbinds a name from ctx, and removes parents if they are empty
     *
 
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.