private static java.rmi.activation.ActivationGroupID check( ActivationSystem system, UID uid, Field field) throws InvalidObjectException { java.rmi.activation.ActivationGroupID actGroupID = new java.rmi.activation.ActivationGroupID(system); try { field.set(actGroupID, uid); } catch (IllegalArgumentException ex) { throw new InvalidObjectException(ex.toString()); } catch (IllegalAccessException ex) { throw new InvalidObjectException(ex.toString()); } return actGroupID; }
ActivationGroupIDSerializer(java.rmi.activation.ActivationGroupID resolve){ this.resolve = resolve; system = resolve.getSystem(); // REMIND: shouldn't throw exception here try { uid = (UID) uidField.get(resolve); } catch (IllegalArgumentException ex) { throw new IllegalArgumentException(ex); } catch (IllegalAccessException ex) { throw new IllegalArgumentException(ex); } }
@Override public ActivationDesc setActivationDesc(ActivationID id, ActivationDesc desc) throws ActivationException { UID uid = getUID(id); writeLock.lock(); try { if (!getGroupID(uid).equals(desc.getGroupID())) { throw new ActivationException( "ActivationDesc contains wrong group"); } return getGroupEntry(uid).setActivationDesc(uid, desc, true); } finally { writeLock.unlock(); } }
unexportWait = getInt(config, "unexportWait", 10); ActivationSystem sys = (ActivationSystem) sysPreparer.prepareProxy(id.getSystem()); AbstractActivationGroup.incarnation = incarnation; groupID = id; state = CREATING; ActivationGroupID gid = (sys == id.getSystem() ? id : new WrappedGID(id, sys)); Object group = ActivationGroup.createGroup(
@Override public ActivationGroupID registerGroup(ActivationGroupDesc desc) throws ActivationException { ActivationGroupID id = new ActivationGroupID(systemStub); writeLock.lock(); try { addLogRecord(new LogRegisterGroup(id, desc)); groupTable.put(id, new GroupEntry(id, desc, Activation.this)); } finally { writeLock.unlock(); } return id; }
void export() throws NoSuchObjectException, ExportException, RemoteException, UnknownGroupException, ActivationException { synchronized (AbstractActivationGroup.class) { if (state != CREATING) { throw new ActivationException("not called from createGroup"); } if (refuseCalls) { unexportObject(this, true); refuseCalls = false; } proxy = (ActivationInstantiator) exporter.export(this); try { monitor = (ActivationMonitor) monPreparer.prepareProxy( id.getSystem().activeGroup(id, proxy, incarnation)); state = CREATED; } finally { if (state != CREATED) { exporter.unexport(true); } } monPreparer = null; } }