Examples of rebind()


Examples of javax.naming.Context.rebind()

                    }

                }

                try {
                    bindContext.rebind(name, value);
                } catch (NamingException e) {
                    throwException(javaContextNamingEvent, new IllegalStateException("Cannot bind element '" + name
                            + "' for bean '" + beanName + "'.", e));
                }
            }
View Full Code Here

Examples of javax.naming.Context.rebind()

            compCtx.rebind("UserTransaction", this.userTransaction);
        }

        // bind ORB
        try {
            compCtx.rebind("ORB", ORBInitHelper.getORB());
        } catch (NamingException e) {
            logger.error("Cannot bind ORB", e);
        }

        return ctx;
View Full Code Here

Examples of javax.naming.Context.rebind()

            try {
                subctx = lookupCtx(n.get(0));
            } catch (NameNotFoundException e) {
                subctx = createSubcontext(n.get(0));
            }
            subctx.rebind(suffix, obj);
        }
    }

    /**
     * Unbinds the named object.
View Full Code Here

Examples of javax.naming.Context.rebind()

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         ctx2.rebind(ObjectBinder.NAME, ObjectBinder.VALUE);
      }
      catch (NamingException e)
      {
         log.error("Caught NamingException", e);
         fail(e.getMessage());
View Full Code Here

Examples of javax.naming.Context.rebind()

      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

Examples of javax.naming.Context.rebind()

      {
         assertTrue("binding key a second time in HA-JNDI should throw NamingException", ne instanceof NamingException);
      }
     
      // rebind it using a different value
      naming.rebind(JNDI_KEY, JNDI_VALUE2)
     
      // lookup binding - should return new value
      value = (String)lookup(naming, JNDI_KEY, true);
      assertEquals("lookup after HA-JNDI rebind operation", JNDI_VALUE2, value);
     
View Full Code Here

Examples of javax.naming.InitialContext.rebind()

  /** Binds an object to the JNDI context. */
  void bind(String name, Object obj) {
    try {
      Context ctx = new InitialContext();
      ctx.rebind(name, obj);
      if (! boundNames.contains(name))
        boundNames.add(name);
    } catch (Exception e) {
      if (logger.isLoggable(BasicLevel.WARN))
        logger.log(BasicLevel.WARN,
View Full Code Here

Examples of javax.naming.InitialContext.rebind()

      redeployNaming();
     
      Context ctx2 = new InitialContext(env);
      try
      {
         ctx2.rebind(ObjectBinder.NAME, ObjectBinder.VALUE);
      }
      catch (NamingException e)
      {
         log.error("Caught NamingException", e);
         fail(e.getMessage());
View Full Code Here

Examples of javax.naming.InitialContext.rebind()

      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

Examples of javax.naming.directory.DirContext.rebind()

        }

        try {
            Resource newResource = new Resource(resourceInputStream);
            if (exists) {
                resources.rebind(path, newResource);
            } else {
                resources.bind(path, newResource);
            }
        } catch(NamingException e) {
            result = false;
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.