Package javax.naming

Examples of javax.naming.InitialContext.rebind()


         test = (Context)ctx.lookup("test");
         Object server2 = test.lookup("server");
         System.out.println("test then server lookup:"+server2);

         // Rebind object
         iniCtx.rebind("test/server2", hello2);
         System.out.println("test/server2 rebound");

         showTree(ctx);
        
         // Rename object using absolute and relative names
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

   private InitialContextInitializer(String name, Reference reference) throws NamingException, FileNotFoundException,
      XMLStreamException
   {
      PrivilegedSystemHelper.setProperty(Context.INITIAL_CONTEXT_FACTORY, DEFAULT_INITIAL_CONTEXT_FACTORY);
      InitialContext initialContext = getInitialContext();
      initialContext.rebind(name, reference);

      // binder
      binder = new InitialContextBinder(this, DEFAULT_BINDING_STORE_PATH);
   }
View Full Code Here

      {
         BindReferencePlugin brplugin = (BindReferencePlugin)plugin;
         try
         {
            InitialContext ic = getInitialContext();
            ic.rebind(brplugin.getBindName(), brplugin.getReference());
            LOG.info("Reference bound: " + brplugin.getBindName());
            bindReferencesPlugins.add((BindReferencePlugin)plugin);
         }
         catch (NamingException e)
         {
View Full Code Here

   {
      InitialContext ctx = new InitialContext();
      Class<?> interfaces[] = { VMIdentifier.class };
      // TODO: OID should match MC name
      Object proxy = Remoting.createPojiProxy(OID, interfaces, "socket://0.0.0.0:3874");
      ctx.rebind("VMIdentifier", proxy);
      Dispatcher.singleton.registerTarget(OID, this);
   }
}
View Full Code Here

   public void start() throws Exception
   {
      InitialContext ctx = new InitialContext();
      Class<?> interfaces[] = { RemoteKernelController.class };
      Object proxy = Remoting.createPojiProxy(OID, interfaces, "socket://0.0.0.0:3874");
      ctx.rebind("RemoteKernelController", proxy);
      Dispatcher.singleton.registerTarget(OID, this);
   }
  
   public void stop() throws Exception
   {
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

        if (spaceName == null)
            sp = new SpaceProxy ();
        else
            sp = new SpaceProxy (spaceName);
        InitialContext ctx = new InitialContext ();
        ctx.rebind (getName (), sp);
    }

    protected void stopService () {
        sp.shutdown ();
    }
View Full Code Here

    protected void startService () throws RemoteException, NamingException, NotFoundException {
        qmux = (QMUX) NameRegistrar.get(qmuxName);
        qmuxproxy = new QMUXProxy(qmux);
        InitialContext ctx = new InitialContext ();
        ctx.rebind (getName (), qmuxproxy);
    }

    protected void stopService () throws NamingException {
        InitialContext ctx = new InitialContext ();
        ctx.unbind(getName());
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.