public org.omg.CORBA.Object createReference(final String interfId) throws Exception { final org.omg.CORBA.Object corbaRef = poa.create_reference_with_id(EMPTY_BYTES, interfId); if (policies != null) { return corbaRef._set_policy_override(policies, SetOverrideType.ADD_OVERRIDE); } else { return corbaRef; } }
public org.omg.CORBA.Object createReferenceWithId(final byte[] id, final String interfId) throws Exception { final org.omg.CORBA.Object corbaRef = poa.create_reference_with_id(id, interfId); if (policies != null) { return corbaRef._set_policy_override(policies, SetOverrideType.ADD_OVERRIDE); } else { return corbaRef; } }
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; } }
namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
public org.omg.CORBA.Object createReference(final String interfId) throws Exception { final org.omg.CORBA.Object corbaRef = poa.create_reference_with_id(EMPTY_BYTES, interfId); if (policies != null) { return corbaRef._set_policy_override(policies, SetOverrideType.ADD_OVERRIDE); } else { return corbaRef; } }
public org.omg.CORBA.Object createReferenceWithId(final byte[] id, final String interfId) throws Exception { final org.omg.CORBA.Object corbaRef = poa.create_reference_with_id(id, interfId); if (policies != null) { return corbaRef._set_policy_override(policies, SetOverrideType.ADD_OVERRIDE); } else { return corbaRef; } }
/** * getObjectReferenceFromKey returns the Object reference from the objectkey using POA.create_reference_with_id method * @param Object Key as String * @returns reference an CORBA.Object. */ org.omg.CORBA.Object getObjectReferenceFromKey( String key ) { org.omg.CORBA.Object theObject = null; try { theObject = nsPOA.create_reference_with_id( key.getBytes( ), NamingContextHelper.id( ) ); } catch (Exception e ) { theObject = null; } return theObject; }
@Override public NamingContext new_context() { if( destroyed ) return null; org.omg.CORBA.Object ctx = null; try { byte[] oid = (new String(poa.servant_to_id(this)) + "_ctx" + (++child_count)).getBytes(); ctx = poa.create_reference_with_id( oid, "IDL:omg.org/CosNaming/NamingContextExt:1.0"); if (logger.isInfoEnabled()) { logger.info("New context."); } } catch ( Exception ue ) { if (logger.isErrorEnabled()) { logger.error ("failed to create new context", ue); } throw new RuntimeException ("failed to create new context: " + ue.toString()); } return NamingContextExtHelper.narrow(ctx); }
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; } }
org.omg.CORBA.portable.Delegate createDelegate(RMIServant servant) { checkShutDown(); byte[] id = servant._id; RemoteDescriptor desc = servant._descriptor; String repid = desc.getRepositoryID(); org.omg.CORBA.portable.ObjectImpl ref; org.omg.PortableServer.POA poa; try { poa = getPOA(); ref = (org.omg.CORBA.portable.ObjectImpl) poa .create_reference_with_id(id, repid); } catch (org.omg.CORBA.BAD_PARAM ex) { throw (InternalError)new InternalError("wrong policy: " + ex.getMessage()).initCause(ex); } return ref._get_delegate(); }
public EndpointReferenceType getAddressWithId(String id) { EndpointReferenceType ref = null; if (bindingPOA == null) { throw new CorbaBindingException( "getAddressWithId failed because the poa is null"); } try { Servant servant = bindingPOA.id_to_servant(objectId); org.omg.CORBA.Object objRef = bindingPOA.create_reference_with_id(id.getBytes(), servant._all_interfaces(bindingPOA, objectId)[0]); AddressType addr = new AddressType(); orbConfig.exportObjectReference(orb, objRef, address.getLocation(), addr); ref = EndpointReferenceUtils.getEndpointReference(addr.getLocation()); EndpointInfo ei = getEndPointInfo(); if (ei.getService() != null) { EndpointReferenceUtils.setServiceAndPortName(ref, ei.getService().getName(), ei.getName().getLocalPart()); } } catch (Exception e) { throw new CorbaBindingException("Failed to getAddressWithId, reason:" + e.toString(), e); } return ref; }
namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId, "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
org.omg.CORBA.Object obj = ourPOA.create_reference_with_id("RecoveryManager".getBytes(), RecoveryCoordinatorHelper.id());
org.omg.CORBA.Object obj = ourPOA.create_reference_with_id(RC_ID.getBytes(), RecoveryCoordinatorHelper.id());
org.omg.CORBA.Object obj = ourPOA.create_reference_with_id("RecoveryManager".getBytes(), RecoveryCoordinatorHelper.id());
poa = (POA)orb.peekInvocationInfo().oa(); String repId = self._all_interfaces(poa,oid)[0] ; return poa.create_reference_with_id(oid, repId); } catch (EmptyStackException notInInvocationE) {
poa = (POA)orb.peekInvocationInfo().oa(); String repId = self._all_interfaces(poa,oid)[0] ; return poa.create_reference_with_id(oid, repId); } catch (EmptyStackException notInInvocationE) {
poa = (POA)orb.peekInvocationInfo().oa(); String repId = self._all_interfaces(poa,oid)[0] ; return poa.create_reference_with_id(oid, repId); } catch (EmptyStackException notInInvocationE) {