o = rootPoa.id_to_reference(oid); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.logInternalError(e);
/** * Convert a servant to a reference. */ protected org.omg.CORBA.Object servantToReference(Servant servant) { byte[] id = getObjectId(); try { repository.poa.activate_object_with_id(id, servant); org.omg.CORBA.Object ref = repository.poa.id_to_reference(id); return ref; } catch (WrongPolicy ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ServantAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectNotActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } return null; }
/** * Create a top-level naming context. * * @param orb The orb hosting this context. * @param poa The POA used to activate the object. * * @exception Exception */ public TransientNamingContext(ORB orb, POA poa) throws Exception { this(orb, poa, null); // now get the initial root context as a corba object. byte[] objectId = poa.activate_object(this); rootContext = poa.id_to_reference(objectId); }
/** * Create a top-level naming context. * * @param orb The orb hosting this context. * @param poa The POA used to activate the object. * * @exception Exception */ public TransientNamingContext(ORB orb, POA poa) throws Exception { this(orb, poa, null); // now get the initial root context as a corba object. byte[] objectId = poa.activate_object(this); rootContext = poa.id_to_reference(objectId); }
private org.omg.CORBA.portable.ObjectImpl export() { try { if (id != null) { throw new Error("Internal consistency error!"); } id = poa.activate_object(servant); return (org.omg.CORBA.portable.ObjectImpl) poa.id_to_reference(id); } catch (org.omg.PortableServer.POAPackage.ServantAlreadyActive ex) { throw new Error(ex.getMessage(), ex); } catch (org.omg.PortableServer.POAPackage.ObjectNotActive ex) { throw new Error(ex.getMessage(), ex); } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { throw new Error(ex.getMessage(), ex); } }
org.omg.CORBA.Object obj = nsPOA.id_to_reference( objectId ); lifecycleLogger.fine( "TransientNamingContext " + "LIFECYCLE.CREATE SUCCESSFUL" );
org.omg.CORBA.Object obj = nsPOA.id_to_reference( objectId );
o = rootPoa.id_to_reference(oid); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.logInternalError(e);
o = rootPoa.id_to_reference(oid); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.logInternalError(e);
o = rootPoa.id_to_reference(oid);
org.omg.CORBA.Object obj = poa.id_to_reference(objectId);
/** * Create a new context of the same type as the * calling context. * * @return A new NamingContext item. * @exception org.omg.CosNaming.NamingContextPackage.NotFound * @exception SystemException */ public NamingContext new_context() throws SystemException { try { // create a new context. Then we need to register this with the POA and activate it. TransientNamingContext newContext = new TransientNamingContext(orb, poa, rootContext); byte[] objectId = poa.activate_object(newContext); org.omg.CORBA.Object obj = poa.id_to_reference(objectId); return NamingContextHelper.narrow(obj); } catch (SystemException e) { // just propagate system exceptions throw e; } catch (Exception e) { throw (INTERNAL)(new INTERNAL("Unable to create new naming context").initCause(e)); } }
/** * Create a new context of the same type as the * calling context. * * @return A new NamingContext item. * @exception org.omg.CosNaming.NamingContextPackage.NotFound * @exception SystemException */ public NamingContext new_context() throws SystemException { try { // create a new context. Then we need to register this with the POA and activate it. TransientNamingContext newContext = new TransientNamingContext(orb, poa, rootContext); byte[] objectId = poa.activate_object(newContext); org.omg.CORBA.Object obj = poa.id_to_reference(objectId); return NamingContextHelper.narrow(obj); } catch (SystemException e) { // just propagate system exceptions throw e; } catch (Exception e) { throw (INTERNAL)(new INTERNAL("Unable to create new naming context").initCause(e)); } }
/** * Create a list of bound objects an contexts contained * within this context. * * @param how_many The count of elements to return as a BindingList. * @param bl A holder element for returning the source binding list. * @param bi A holder for returning a BindingIterator. Any extra * elements not returned in the BindingList are returned * in the BindingIterator. * * @exception SystemException */ public synchronized void list(int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi) throws SystemException { TransientBindingIterator iterator = new TransientBindingIterator(poa, (HashMap)bindings.clone()); // have the iterator fill in the entries here iterator.next_n(how_many, bl); // now it's necessary to activate this iterator with the poa. The value we pass // back is the narrowed activated object try { byte[] objectId = poa.activate_object(iterator); org.omg.CORBA.Object obj = poa.id_to_reference(objectId); bi.value = BindingIteratorHelper.narrow(obj); } catch (SystemException e) { // just propagate system exceptions throw e; } catch (Exception e) { throw (INTERNAL)(new INTERNAL("Unable to activate BindingIterator").initCause(e)); } }
thisRef_ = eventChannelFactoryPOA_.id_to_reference(oid_); ior_ = orb.object_to_string(eventChannelFactoryPOA_.id_to_reference(oid_));
org.omg.CORBA.Object obj = biPOA.id_to_reference( objectId );
/** * Convert a servant to a reference. */ protected org.omg.CORBA.Object servantToReference(Servant servant) { byte[] id = getObjectId(); try { repository.poa.activate_object_with_id(id, servant); org.omg.CORBA.Object ref = repository.poa.id_to_reference(id); return ref; } catch (WrongPolicy ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ServantAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectNotActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } return null; }
/** * Convert a servant to a reference. */ protected org.omg.CORBA.Object servantToReference(Servant servant) { byte[] id = getObjectId(); try { repository.poa.activate_object_with_id(id, servant); org.omg.CORBA.Object ref = repository.poa.id_to_reference(id); return ref; } catch (WrongPolicy ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ServantAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectAlreadyActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } catch (ObjectNotActive ex) { IIOPLogger.ROOT_LOGGER.debug("Exception converting CORBA servant to reference", ex); } return null; }
public synchronized org.omg.SendingContext.RunTime getRunTimeCodeBase() { logger.finer("getRunTimeCodeBase"); if (codeBase == null) { codeBase = new RunTimeCodeBaseImpl(this); } org.omg.CORBA.ORB orb = RMIState.current().getORB(); org.omg.PortableServer.POA poa = RMIState.current().getPOA(); try { org.omg.CORBA.Object ref = poa.servant_to_reference(codeBase); return org.omg.SendingContext.CodeBaseHelper.narrow(ref); } catch (org.omg.PortableServer.POAPackage.ServantNotActive ex) { // ignore // } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL("should not happen").initCause(ex); } try { byte[] id = poa.activate_object(codeBase); org.omg.CORBA.Object ref = poa.id_to_reference(id); return org.omg.SendingContext.CodeBaseHelper.narrow(ref); } catch (org.omg.PortableServer.POAPackage.ServantAlreadyActive ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL("should not happen").initCause(ex); } catch (org.omg.PortableServer.POAPackage.ObjectNotActive ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL("should not happen").initCause(ex); } catch (org.omg.PortableServer.POAPackage.WrongPolicy ex) { throw (org.omg.CORBA.INTERNAL)new org.omg.CORBA.INTERNAL("should not happen").initCause(ex); } }
byte[] rootContextId = nsPOA.activate_object( initialContext ); initialContext.localRoot = nsPOA.id_to_reference( rootContextId ); theInitialNamingContext = initialContext.localRoot; orb.register_initial_reference( nameServiceName,