public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this), StandardCharsets.UTF_8) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(StandardCharsets.UTF_8), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(StandardCharsets.UTF_8), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); 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; }
namingPOA.activate_object_with_id(rootContextId, ns); namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isTraceEnabled()) { opLogger.logger.trace("ChildOA::objectIsReady (Servant, byte[], " + _oaName + ")"); } try { _oa.poa(_oaName).activate_object_with_id(id, obj); } catch (Exception e) { opLogger.i18NLogger.warn_OA_exceptioncaughtforobj("objectIsReady", obj.toString(), e); return false; } return true; }
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isTraceEnabled()) { opLogger.logger.trace("RootOA::objectIsReady (Servant, byte[], " + _oaName + ")"); } try { _oa.rootPoa().activate_object_with_id(id, obj); } catch (Exception e) { opLogger.i18NLogger.warn_OA_exceptioncaughtforobj("objectIsReady", obj.toString(), e); return false; } return true; }
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isTraceEnabled()) { opLogger.logger.trace("ChildOA::objectIsReady (Servant, byte[], " + _oaName + ")"); } try { _oa.poa(_oaName).activate_object_with_id(id, obj); } catch (Exception e) { opLogger.i18NLogger.warn_OA_exceptioncaughtforobj("objectIsReady", obj.toString(), e); return false; } return true; }
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isTraceEnabled()) { opLogger.logger.trace("RootOA::objectIsReady (Servant, byte[], " + _oaName + ")"); } try { _oa.rootPoa().activate_object_with_id(id, obj); } catch (Exception e) { opLogger.i18NLogger.warn_OA_exceptioncaughtforobj("objectIsReady", obj.toString(), e); return false; } return true; }
/** * Rebind an object by using a secure POA (csiv2) * @param name name of the object * @param r remote object to bind * @throws Exception if the object cannot be bound */ private void rebindWithSpecificPoa(final Name name, final Remote r) throws Exception { POA securedPOA = createSecurePOA(name.toString()); org.omg.PortableServer.Servant servant = (org.omg.PortableServer.Servant) Util.getTie(r); securedPOA.activate_object_with_id(name.toString().getBytes(), servant); getWrappedContext().rebind(name, securedPOA.servant_to_reference(servant)); }
/** * Bind an object by using a secure POA (csiv2) * @param name name of the object * @param r remote object to bind * @throws Exception if the object cannot be bound */ private void bindWithSpecificPoa(final Name name, final Remote r) throws Exception { POA securedPOA = createSecurePOA(name.toString()); org.omg.PortableServer.Servant servant = (org.omg.PortableServer.Servant) Util.getTie(r); securedPOA.activate_object_with_id(name.toString().getBytes(), servant); getWrappedContext().bind(name, securedPOA.servant_to_reference(servant)); }
public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this)) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
public NamingContext new_context() { try { // create and initialize a new context. CorbaNamingContext newContextImpl = new CorbaNamingContext(); newContextImpl.init(this.poa, this.doPurge, this.noPing); // create the oid for the new context and activate it with the naming service POA. String oid = new String(this.poa.servant_to_id(this), StandardCharsets.UTF_8) + "/ctx" + (++this.childCount); this.poa.activate_object_with_id(oid.getBytes(StandardCharsets.UTF_8), newContextImpl); // add the newly-created context to the cache. contextImpls.put(oid, newContextImpl); return NamingContextExtHelper.narrow(this.poa.create_reference_with_id(oid.getBytes(StandardCharsets.UTF_8), "IDL:omg.org/CosNaming/NamingContextExt:1.0")); } catch (Exception e) { IIOPLogger.ROOT_LOGGER.failedToCreateNamingContext(e); return null; } }
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isDebugEnabled()) { opLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ORB_PORTABILITY, "ChildOA::objectIsReady (Servant, byte[], "+_oaName+")"); } try { _oa.poa(_oaName).activate_object_with_id(id, obj); } catch (Exception e) { if (opLogger.loggerI18N.isWarnEnabled()) { opLogger.loggerI18N.warn("com.arjuna.orbportability.OA.exceptioncaughtforobj", new Object[] { "objectIsReady", obj, e.toString() }); } return false; } return true; }
public boolean objectIsReady (Servant obj, byte[] id) throws SystemException { if (opLogger.logger.isDebugEnabled()) { opLogger.logger.debug(DebugLevel.FUNCTIONS, VisibilityLevel.VIS_PUBLIC, FacilityCode.FAC_ORB_PORTABILITY, "RootOA::objectIsReady (Servant, byte[], "+_oaName+")"); } try { _oa.rootPoa().activate_object_with_id(id, obj); } catch (Exception e) { if (opLogger.loggerI18N.isWarnEnabled()) { opLogger.loggerI18N.warn("com.arjuna.orbportability.OA.exceptioncaughtforobj", new Object[] { "objectIsReady", obj, e.toString() }); } return false; } return true; }
imr_poa.activate_object_with_id( id, _imr );
/** * 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; }
if (recoverable && globalTID != null) { id = globalTID.toBytes(); poa.activate_object_with_id(id, this); org.omg.CORBA.Object obj = poa.create_reference_with_id(id, CoordinatorResourceHelper.id()); thisRef = CoordinatorResourceHelper.narrow(obj);
namingPOA.activate_object_with_id(rootContextId, ns); namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
namingPOA.activate_object_with_id(rootContextId, ns); namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));