Package org.omg.CosNaming

Examples of org.omg.CosNaming.NamingContextExt.rebind()


            NamingContextExt nc = NamingContextExtHelper.narrow(orb
                    .resolve_initial_references("NameService"));
            EventChannelImpl channel = new EventChannelImpl(orb, poa);
            org.omg.CORBA.Object o = poa.servant_to_reference(channel);
            /* event channel used by event service */
            nc.rebind(nc.to_name("eventchannel"), o);
        } catch (Exception e) {

        }
        allParticipant = new Vector();
        /* thread send message for all suscriber */
 
View Full Code Here


            if (ncRef != null) {
                // bind the Object Reference in Naming
                NameComponent path[] = ncRef.to_name(new Integer(domainId)
                        .toString());
                ncRef.rebind(path, ref);
                allParticipant.add(ref);
                Consummer.add(ref);
            }
        } catch (Exception e) {
        }
View Full Code Here

            NameComponent[] ncx = new NameComponent[1];
            ncx[0] = nb;
            NamingContextExt nce = NamingContextExtHelper.narrow(resolve(ctx.components()));
            if( nce == null )
                throw new CannotProceed();
            nce.rebind(ncx,obj);
        }
    }


    /**
 
View Full Code Here

                context.bind( bindname.components(), orb.string_to_object( ior ));
            }
            catch( AlreadyBound ab )
            {
                if (isRebind)
                    context.rebind( bindname.components(), orb.string_to_object( ior ));
                else
                    throw ab;
            }
      update();
  }
View Full Code Here

        Account account = tie._this(orb);
        org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
        NamingContextExt namingCtx = NamingContextExtHelper.narrow(objRef);

        NameComponent path[] = namingCtx.to_name( accNum );
        namingCtx.rebind(path, account);

        System.out.println("AccountServer ready and waiting ...");
        orb.run();
    }
View Full Code Here

    NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);
    LOG.info("NamingContext created");

    // bind the Object Reference in Naming
    NameComponent path[] = ncRef.to_name(BANKNAME);
    ncRef.rebind(path, bankRef);
    LOG.info("Bank reference bound");

    // wait for invocations from clients
    LOG.info("BankServer ready and waiting ...");
    orb.run();
View Full Code Here

            SMSGatewayServant smsGateway = new SMSGatewayServant();
            Object smsGatewayRef = rootPoa.servant_to_reference(smsGateway);

            String corbaServerName = "SMSGatewayCORBAService";
            NameComponent[] name = {new NameComponent(corbaServerName, "")};
            namingCtx.rebind(name, smsGatewayRef);

            System.out.println("CORBA server running - press Enter to shutdown");
            System.in.read();

            orb.shutdown(true);
View Full Code Here

        //Register in NameService
        try {
            org.omg.CORBA.Object nsObj = orb.resolve_initial_references("NameService");
            NamingContextExt rootContext = NamingContextExtHelper.narrow(nsObj);
            NameComponent[] nc = rootContext.to_name(name);
            rootContext.rebind(nc, ref);
        } catch (Exception ex) {
            throw new CorbaBindingException(ex);
        }
    }
    public void exportObjectReferenceToCorbaloc(ORB orb,
View Full Code Here

    try {
      nc = NamingContextExtHelper.narrow(theOrb
          .resolve_initial_references("NameService"));
      System.out.println("resolved initial reference to NameService ...");

      nc.rebind(nc.to_name("admin"), thePoa.servant_to_reference(admins));
      nc.rebind(nc.to_name("customer"),
          thePoa.servant_to_reference(customers));
      System.out.println("resolved references to NameService");
    } catch (InvalidName e) {
      e.printStackTrace(System.err);
View Full Code Here

      nc = NamingContextExtHelper.narrow(theOrb
          .resolve_initial_references("NameService"));
      System.out.println("resolved initial reference to NameService ...");

      nc.rebind(nc.to_name("admin"), thePoa.servant_to_reference(admins));
      nc.rebind(nc.to_name("customer"),
          thePoa.servant_to_reference(customers));
      System.out.println("resolved references to NameService");
    } catch (InvalidName e) {
      e.printStackTrace(System.err);
    } catch (NotFound 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.