Fixed problems with trying to boot up cluster through accessing Actor.remote when it should not

This commit is contained in:
Jonas Bonér 2011-05-20 15:04:21 +02:00
parent 19f6e6a469
commit b9a1d49999
3 changed files with 3 additions and 3 deletions

View file

@ -615,7 +615,7 @@ class LocalActorRef private[akka] (private[this] val actorFactory: () ⇒ Actor,
currentMessage = null
Actor.registry.unregister(this)
if (isRemotingEnabled)
if (ClusterModule.isEnabled && isRemotingEnabled)
Actor.remote.unregister(this)
setActorSelfFields(actorInstance.get, null)

View file

@ -134,7 +134,7 @@ class LocalActorRegistry(
*/
def shutdownAll() {
foreach(_.stop)
if (RemoteModule.isEnabled) Actor.remote.clear //TODO: REVISIT: Should this be here?
if (ClusterModule.isEnabled) Actor.remote.clear //FIXME: Should this be here?
actorsByAddress.clear
actorsByUuid.clear
typedActorsByUuid.clear

View file

@ -140,7 +140,7 @@ sealed class Supervisor(handler: FaultHandlingStrategy, maxRestartsHandler: (Act
_childActors.put(className, actorRef :: currentActors)
actorRef.lifeCycle = lifeCycle
supervisor.link(actorRef)
if (registerAsRemoteService)
if (ClusterModule.isEnabled && registerAsRemoteService)
Actor.remote.register(actorRef)
case supervisorConfig@SupervisorConfig(_, _, _) // recursive supervisor configuration
val childSupervisor = Supervisor(supervisorConfig)