public ReferenceFactory bind(final String name, final Servant servant) throws Exception { final POA poa = rootPOA.getValue().create_POA(name, null, transientPoaPolicies); transientPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant, final Policy[] policies) throws Exception { final Policy[] poaPolicies = concatPolicies(transientPoaPolicies, policies); final POA poa = rootPOA.getValue().create_POA(name, null, poaPolicies); transientPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant, final Policy[] policies) throws Exception { final Policy[] poaPolicies = concatPolicies(persistentPoaPolicies, policies); final POA poa = rootPOA.getValue().create_POA(name, null, poaPolicies); persistentPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant) throws Exception { final POA poa = rootPOA.getValue().create_POA(name, null, persistentPoaPolicies); persistentPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
try { Policy[] poaPolicies = this.createPolicies(parentPOA); this.poa = parentPOA.create_POA(this.poaName, null, poaPolicies); } catch (Exception e) { throw IIOPLogger.ROOT_LOGGER.errorCreatingPOAFromParent(e);
RMIState(org.omg.CORBA.ORB orb, String name) { if (orb == null) { throw new NullPointerException("ORB is null"); } try { POA rootPoa = (POA) orb.resolve_initial_references("RootPOA"); poa = rootPoa.create_POA(name, null, new Policy[0]); poa.the_POAManager().activate(); } catch (AdapterAlreadyExists e) { logger.log(Level.WARNING, "Adapter already exists", e); } catch (InvalidPolicy e) { logger.log(Level.WARNING, "Invalid policy", e); } catch (InvalidName e) { logger.log(Level.WARNING, "Invalid name", e); } catch (AdapterInactive e) { logger.log(Level.WARNING, "Adapter inactive", e); } _orb = orb; _name = name; }
protected POA createPOA(String name, POA parentPOA, POAManager poaManager) { List<Policy> policies = new ArrayList<>(); policies.add(parentPOA .create_thread_policy(ThreadPolicyValue.ORB_CTRL_MODEL)); if (isPersistent) { policies.add(parentPOA .create_lifespan_policy(LifespanPolicyValue.PERSISTENT)); } else { policies.add(parentPOA .create_lifespan_policy(LifespanPolicyValue.TRANSIENT)); } if (serviceId != null) { policies.add(parentPOA .create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID)); } policies.add(parentPOA.create_id_uniqueness_policy(IdUniquenessPolicyValue.MULTIPLE_ID)); RequestProcessingPolicyValue value = RequestProcessingPolicyValue.USE_DEFAULT_SERVANT; policies.add(parentPOA.create_request_processing_policy(value)); orbConfig.addPOAPolicies(orb, name, parentPOA, poaManager, policies); Policy[] policyList = policies.toArray(new Policy[0]); try { return parentPOA.create_POA(name, poaManager, policyList); } catch (Exception ex) { throw new CorbaBindingException( "Could not create POA during activation", ex); } } public EndpointReferenceType getAddressWithId(String id) {
public ReferenceFactory bind(final String name, final Servant servant) throws Exception { final POA poa = rootPOA.getValue().create_POA(name, null, transientPoaPolicies); transientPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant, final Policy[] policies) throws Exception { final Policy[] poaPolicies = concatPolicies(persistentPoaPolicies, policies); final POA poa = rootPOA.getValue().create_POA(name, null, poaPolicies); persistentPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant) throws Exception { final POA poa = rootPOA.getValue().create_POA(name, null, persistentPoaPolicies); persistentPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
public ReferenceFactory bind(final String name, final Servant servant, final Policy[] policies) throws Exception { final Policy[] poaPolicies = concatPolicies(transientPoaPolicies, policies); final POA poa = rootPOA.getValue().create_POA(name, null, poaPolicies); transientPoaMap.put(name, poa); poa.set_servant(servant); poa.the_POAManager().activate(); return new PoaReferenceFactory(poa); // no servantName: in this case // name is the POA name }
/** * Build a new POA (with csiv2 policy) * @param nameId name for POA * @return a POA * @throws Exception if the POA cannot be created */ private POA createSecurePOA(final String nameId) throws Exception { //TODO : Detect if a POA with this name already exists and avoid to // create it. // use random for now // Create policies org.omg.CORBA.Policy[] policies = new org.omg.CORBA.Policy[POA_POLICIES_NUMBER]; policies[0] = rootPOA.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID); policies[1] = rootPOA.create_lifespan_policy(LifespanPolicyValue.TRANSIENT); policies[2] = new SasPolicy(sasComponent); return rootPOA.create_POA(nameId + Math.random(), rootPOA.the_POAManager(), policies); }
public void createPOA (String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { opLogger.i18NLogger.warn_internal_orbspecific_oa_implementations("jacorb_2_0.createPOA"); throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); }
public void createPOA (String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { opLogger.i18NLogger.warn_internal_orbspecific_oa_implementations("jacorb_2_0.createPOA"); throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); }
/** * Create a child POA of the root POA. */ public void createPOA(String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { opLogger.i18NLogger.warn_internal_orbspecific_oa_implementations("javaidl_1_4.createPOA"); throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); } }
/** * Create a child POA of the root POA. */ public void createPOA(String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { opLogger.i18NLogger.warn_internal_orbspecific_oa_implementations("javaidl_1_4.createPOA"); throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); } }
.toArray(new org.omg.CORBA.Policy[_policyList.size()]); POA poa = rootPOA.create_POA("NotifyServicePOA", rootPOA.the_POAManager(), _policies);
/** * Create a child POA of the root POA. */ public void createPOA(String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { if (opLogger.loggerI18N.isWarnEnabled()) { opLogger.loggerI18N.warn("com.arjuna.orbportability.internal.orbspecific.javaidl.oa.implementations.javaidl_1_4.norootoa", new Object[]{"javaidl_1_4.createPOA"}); } throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); } }
/** * @message * com.arjuna.orbportability.internal.orbspecific.jacorb.oa.implementations * .jacorb_2_0.norootoa {0} called without root POA. */ public void createPOA (String adapterName, Policy[] policies) throws AdapterAlreadyExists, InvalidPolicy, AdapterInactive, SystemException { if (_poa == null) { if (opLogger.loggerI18N.isWarnEnabled()) { opLogger.loggerI18N .warn( "com.arjuna.orbportability.internal.orbspecific.jacorb.oa.implementations.jacorb_2_0.norootoa", new Object[] { "jacorb_2_0.createPOA" }); } throw new AdapterInactive(); } POA childPoa = _poa.create_POA(adapterName, _poa.the_POAManager(), policies); childPoa.the_POAManager().activate(); super._poas.put(adapterName, childPoa); }
private synchronized void createbiPOA( ) { if( biPOA != null ) { return; } try { POA rootPOA = (POA) orb.resolve_initial_references( ORBConstants.ROOT_POA_NAME ); rootPOA.the_POAManager().activate( ); int i = 0; Policy[] poaPolicy = new Policy[3]; poaPolicy[i++] = rootPOA.create_lifespan_policy( LifespanPolicyValue.TRANSIENT); poaPolicy[i++] = rootPOA.create_id_assignment_policy( IdAssignmentPolicyValue.SYSTEM_ID); poaPolicy[i++] = rootPOA.create_servant_retention_policy( ServantRetentionPolicyValue.RETAIN); biPOA = rootPOA.create_POA("BindingIteratorPOA", null, poaPolicy ); biPOA.the_POAManager().activate( ); } catch( Exception e ) { throw readWrapper.namingCtxBindingIteratorCreate( e ) ; } }