Package javax.naming

Examples of javax.naming.InitialContext.rebind()


    }
    ConnectionFactory factory = (ConnectionFactory) ConnectionFactoryImpl
        .newInstance();

    try {
      ctx.rebind(bindJaxr, factory);
      jndiAlreadyBound = true;
    } catch (NamingException e) {
      log.error("JNDI Bind Failed:" + bindJaxr);
      e.printStackTrace();
    }
View Full Code Here


      if (!OptionHelper.isEmpty(passwordStr)) {
        setter.setProperty("password", passwordStr);
      }

      Context ctx = new InitialContext();
      ctx.rebind("dataSource", ds);
    } catch (Exception oops) {
      addError(
        "Could not bind  datasource. Reported error follows.", oops);
      ec.addError("Could not not bind  datasource of type [" + dsClassName + "].");
    }
View Full Code Here

        }

        env.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
        InitialContext ctx = new InitialContext(env);

        ctx.rebind(binding, xaDataSourceToBind);

        System.out.println("bound "+binding);
      }
      catch (Exception e)
      {
View Full Code Here

        }

        env.put(Context.INITIAL_CONTEXT_FACTORY, initialCtx);
        InitialContext ctx = new InitialContext(env);

        ctx.rebind(binding, xaDataSourceToBind);

        System.out.println("bound "+binding);
      }
      catch (Exception e)
      {
View Full Code Here

      InitialContext ctx = new InitialContext();
      POJO pojo = new POJO();
      Dispatcher.singleton.registerTarget("pojo", pojo);
      System.out.println("*** hello ***");

      ctx.rebind("pojo", AsynchRemoting.createRemoteProxy("pojo", POJO.class, new InvokerLocator("socket://localhost:5150")));
   }

   public void stop()
   {
      System.out.println("**** STOP ***");
 
View Full Code Here

      if (!OptionHelper.isEmpty(passwordStr)) {
        setter.setProperty("password", passwordStr);
      }

      Context ctx = new InitialContext();
      ctx.rebind("dataSource", ds);
    } catch (Exception oops) {
      addError(
        "Could not bind  datasource. Reported error follows.", oops);
      ec.addError("Could not not bind  datasource of type [" + dsClassName + "].");
    }
View Full Code Here

      /* Bind sul registro RMI */
            Properties prop1 = new Properties();
            prop1.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.rmi.registry.RegistryContextFactory");
            prop1.put(Context.PROVIDER_URL, "rmi://127.0.0.1:" + rmiregistryPort);
            InitialContext cxt1 = new InitialContext(prop1);
            cxt1.rebind("AuthServer", authServer);
            System.out.println("# AuthServer registrato sul Registro RMI.");
     
      /* Bind sul Cos Naming */
            Properties prop2 = new Properties();
            prop2.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
View Full Code Here

      /* Bind sul Cos Naming */
            Properties prop2 = new Properties();
            prop2.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
            prop2.put("java.naming.provider.url", "iiop://127.0.0.1:" + cosnamingPort);
            InitialContext cxt2 = new InitialContext(prop2);
            cxt2.rebind("AuthServer", authServer);
            System.out.println("# AuthServer registrato su COS Naming.");
     
     
     
      /* Esecuzione e registrazione dei "GameServer" */
 
View Full Code Here

    { ctx = ctx.createSubcontext( name.get( i ) ); }
    catch (NameAlreadyBoundException ignore)
    { ctx = (Context) ctx.lookup( name.get( i ) ); }
      }

       ictx.rebind( jndiName, combods );
  }


    }
View Full Code Here

    { ctx = ctx.createSubcontext( name.get( i ) ); }
    catch (NameAlreadyBoundException ignore)
    { ctx = (Context) ctx.lookup( name.get( i ) ); }
      }

       ictx.rebind( jndiName, combods );
  }


    }
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.