static POAImpl makeRootPOA(ORB orb) { POAManagerImpl poaManager = new POAManagerImpl(getPOAFactory(orb), orb.getPIHandler()); POAImpl result = new POAImpl(ORBConstants.ROOT_POA_NAME, null, orb, STATE_START); result.initialize(poaManager, Policies.rootPOAPolicies); return result; }
/** * <code>servant_to_reference</code> <b>3.3.8.20</b> */ public org.omg.CORBA.Object servant_to_reference(Servant servant) throws ServantNotActive, WrongPolicy { try { lock(); if (debug) { ORBUtility.dprint(this, "Calling servant_to_reference(servant=" + servant + ") on poa " + this); } byte[] oid = mediator.servantToId(servant); String repId = servant._all_interfaces(this, oid)[0]; return create_reference_with_id(oid, repId); } finally { unlock(); } }
/** * <code>id</code> <b>11.3.8.26 in ptc/00-08-06</b> */ public byte[] id() { try { lock(); return getAdapterId(); } finally { unlock(); } }
public void deactivateHelper(ActiveObjectMap.Key key, AOMEntry entry, Servant servant) throws ObjectNotActive, WrongPolicy { if (activator == null) throw poa.invocationWrapper().poaNoServantManager(); Etherealizer eth = new Etherealizer(this, key, entry, servant, poa.getDebug()); entry.startEtherealize(eth); }
AdapterActivator act = null; lock(); found.lock(); unlock(); if (!found.waitUntilRunning()) throw omgLifecycleWrapper().poaDestroyed(); found.unlock(); found = new POAImpl(name, this, getORB(), STATE_INIT); unlock(); throw omgLifecycleWrapper().adapterActivatorException(exc, name, poaId.toString()); lifecycleWrapper().unexpectedException(thr, this.toString()); adapterResult = found.destroyIfNotInitDone(); throw omgLifecycleWrapper().adapterActivatorException(name, poaId.toString());
lock(); throw omgLifecycleWrapper().createPoaDestroy(); poa = new POAImpl(name, this, getORB(), STATE_START); poa.lock(); newManager = new POAManagerImpl(manager.getFactory(), manager.getPIHandler()); int defaultCopierId = getORB().getCopierManager().getDefaultId(); Policies POAPolicies = new Policies(policies, defaultCopierId); poa.initialize(newManager, POAPolicies); poa.unlock(); unlock();
if (poa.getDebug()) if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaNoServantManager(); if (poa.getDebug()) poa.unlock(); servant = new NullServantImpl(poa.omgInvocationWrapper().nullServantReturned()); if (poa.getDebug()) if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaServantActivatorLookupFailed(exc); poa.lock(); if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaServantNotUnique();
public void getInvocationServant(OAInvocationInfo info) { try { lock(); if (debug) { ORBUtility.dprint(this, "Calling getInvocationServant on poa " + this); } java.lang.Object servant = null; try { servant = mediator.getInvocationServant(info.id(), info.getOperation()); } catch (ForwardRequest freq) { throw new ForwardException(getORB(), freq.forward_reference); } info.setServant(servant); } finally { if (debug) { ORBUtility.dprint(this, "Exiting getInvocationServant on poa " + this); } unlock(); } }
String orbId = getORB().getORBData().getORBId(); ObjectKeyTemplate oktemp = new POAObjectKeyTemplate(getORB(), scid, serverid, orbId, poaId); initializeTemplate(oktemp, objectAdapterCreated, policies, null, // codebase state = STATE_INIT_DONE; else throw lifecycleWrapper().illegalPoaStateTrans();
POAPolicyMediatorBase(Policies policies, POAImpl poa) throw poa.invocationWrapper().singleThreadNotSupported(); POAManagerImpl poam = (POAManagerImpl) (poa.the_POAManager()); POAFactory poaf = poam.getFactory(); delegateImpl = (DelegateImpl) (poaf.getDelegateImpl()); this.policies = policies; this.poa = poa; orb = poa.getORB();
parent.children.remove(poa.name); destroyedPOATemplates.add(poa.getAdapterTemplate()); throw (ThreadDeath) thr; poa.lifecycleWrapper().unexpectedException(thr, poa.toString());
/** * <code>destroy</code> <b>Section 3.3.8.4</b> */ public void destroy(boolean etherealize, boolean wait_for_completion) { // This is to avoid deadlock if (wait_for_completion && getORB().isDuringDispatch()) { throw lifecycleWrapper().destroyDeadlock(); } DestroyThread destroyer = new DestroyThread(etherealize, debug); destroyer.doIt(this, wait_for_completion); }
private byte[] internalReferenceToId(org.omg.CORBA.Object reference) throws WrongAdapter { IOR ior = ORBUtility.getIOR(reference); IORTemplateList thisTemplate = ior.getIORTemplates(); ObjectReferenceFactory orf = getCurrentFactory(); IORTemplateList poaTemplate = IORFactories.getIORTemplateList(orf); if (!poaTemplate.isEquivalent(thisTemplate)) throw new WrongAdapter(); // Extract the ObjectId from the first TaggedProfile in the IOR. If ior was created in this POA, the same ID was // used for every profile through the profile templates in the currentFactory, so we will get the same result // from any profile. Iterator<Object> iter = ior.iterator(); if (!iter.hasNext()) throw iorWrapper().noProfilesInIor(); TaggedProfile prof = (TaggedProfile) (iter.next()); ObjectId oid = prof.getObjectId(); return oid.getId(); }
uniquePOAId = getPOAFactory(orb).newPOAId();
((POAImpl) iterator.next()).etherealizeAll();
AdapterActivator act = null; lock(); found.lock(); unlock(); if (!found.waitUntilRunning()) throw omgLifecycleWrapper().poaDestroyed(); found.unlock(); found = new POAImpl(name, this, getORB(), STATE_INIT); unlock(); throw omgLifecycleWrapper().adapterActivatorException(exc, name, poaId.toString()); lifecycleWrapper().unexpectedException(thr, this.toString()); adapterResult = found.destroyIfNotInitDone(); throw omgLifecycleWrapper().adapterActivatorException(name, poaId.toString());
lock(); throw omgLifecycleWrapper().createPoaDestroy(); poa = new POAImpl(name, this, getORB(), STATE_START); poa.lock(); newManager = new POAManagerImpl(manager.getFactory(), manager.getPIHandler()); int defaultCopierId = getORB().getCopierManager().getDefaultId(); Policies POAPolicies = new Policies(policies, defaultCopierId); poa.initialize(newManager, POAPolicies); poa.unlock(); unlock();
if (poa.getDebug()) if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaNoServantManager(); if (poa.getDebug()) poa.unlock(); servant = new NullServantImpl(poa.omgInvocationWrapper().nullServantReturned()); if (poa.getDebug()) if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaServantActivatorLookupFailed(exc); poa.lock(); if (poa.getDebug()) if (poa.getDebug()) throw poa.invocationWrapper().poaServantNotUnique();
public void getInvocationServant(OAInvocationInfo info) { try { lock(); if (debug) { ORBUtility.dprint(this, "Calling getInvocationServant on poa " + this); } java.lang.Object servant = null; try { servant = mediator.getInvocationServant(info.id(), info.getOperation()); } catch (ForwardRequest freq) { throw new ForwardException(getORB(), freq.forward_reference); } info.setServant(servant); } finally { if (debug) { ORBUtility.dprint(this, "Exiting getInvocationServant on poa " + this); } unlock(); } }