synchronized void activeGroup(ActivationInstantiator inst, long instIncarnation) throws ActivationException, UnknownGroupException { if (incarnation != instIncarnation) { throw new ActivationException("invalid incarnation"); } if (group != null) { if (group.equals(inst)) { return; } else { throw new ActivationException("group already active"); } } if (child != null && status != CREATING) { throw new ActivationException("group not being created"); } group = inst; status = NORMAL; notifyAll(); }
synchronized MarshalledObject<? extends Remote> activate(ActivationID id, boolean force, ActivationInstantiator inst) throws RemoteException, ActivationException { MarshalledObject<? extends Remote> nstub = stub; if (removed) { throw new UnknownObjectException("object removed"); } else if (!force && nstub != null) { return nstub; } nstub = inst.newInstance(id, desc); stub = nstub; /* * stub could be set to null by a group reset, so return * the newstub here to prevent returning null. */ return nstub; }
/** * Callback from ActivationGroup.createGroup that the groups was * created. */ public synchronized void active(ActivationInstantiator ai, long incarnation) { // rmi.log.6C=ActivationGroupInfo.activeGroup[ActInst={0}; incarn={1}] rLog.log(commonDebugLevel, Messages.getString("rmi.log.6C", ai, //$NON-NLS-1$ incarnation)); activationInstantiator = ai; notify(); if (this.incarnation != incarnation) { // rmi.33=Different incarnations of this group happened. throw new RuntimeException(Messages.getString("rmi.33")); //$NON-NLS-1$ } activationInstantiator = ai; isActive = true; if (startMonitor) { rmidMonitor.activeGroup(agid); } // rmi.log.6D=ActivationGroupInfo.activeGroup finished. rLog.log(commonDebugLevel, Messages.getString("rmi.log.6D")); //$NON-NLS-1$ }
public synchronized MarshalledObject activate( ActivationInstantiator ai) throws ActivationException, RemoteException { // rmi.log.6E=ObjectInfo.activate started. Act Inst = {0} rLog.log(commonDebugLevel,Messages.getString("rmi.log.6E", ai)); //$NON-NLS-1$ if (cachedInstance != null) { // rmi.log.6F=Subsequent call to activate, returning cached instance. rLog.log(commonDebugLevel, Messages.getString("rmi.log.6F")); //$NON-NLS-1$ return cachedInstance; } MarshalledObject mo = ai.newInstance(id, desc); // rmi.log.70=ObjectInfo.activate completed: {0} rLog.log(commonDebugLevel, Messages.getString("rmi.log.70", mo)); //$NON-NLS-1$ return mo; }
public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws ActivationException, UnknownGroupException, RemoteException { checkShutdown(); RegistryImpl.checkAccess("ActivationSystem.activeGroup"); getGroupEntry(id).activeGroup(group, incarnation); return monitor; }
public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws ActivationException, UnknownGroupException, RemoteException { checkShutdown(); // RegistryImpl.checkAccess() is done in the SameHostOnlyServerRef // during unmarshallCustomData and is not applicable to local access. getGroupEntry(id).activeGroup(group, incarnation); return monitor; }
/** @inheritDoc */ public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException { return super.activeGroup(id, group, incarnation); }
/** * Returns the activation monitor (THIS) and remebers the instantiator, used * by that group. */ public ActivationMonitor activeGroup(ActivationGroupID id, ActivationInstantiator group, long incarnation) throws UnknownGroupException, ActivationException, RemoteException { groupInstantiators.put(id, group); return this; }