Well, I have this component based on 1 actor. It is the "flow" thing I
was talking a few months ago, anyway it does take care of a process
between different actors. One thing it does is to stop an other actor
and wait till it is terminated. I need to make sure the other actor is
really terminated because further down an actor with the same name is
created - which randomly & rarely fails with "actor name
[databaseServer] is not unique!"
On 09/10/15 12:17, Patrik Nordwall wrote:
On Fri, Oct 9, 2015 at 12:59 PM, 'Konstantinos Kougios' via Akka User
List <[email protected] <mailto:[email protected]>>
wrote:
oh... in that case my code changes won't work. The watcher is not
the parent of the actor.
Will it work if the watcher is child of the same parent of the
Terminated actor?
no, but what would a sibling do? it can't recreate the actor, it is
only the parent that can create child actor with same name
On 09/10/15 06:08, Patrik Nordwall wrote:
Note that this advice is correct but only when the parent actor
receives the Terminated, i.e. it does not hold for top level
actors where you can only watch from the "outside".
tors 8 okt. 2015 kl. 11:46 skrev Kostas kougios
<[email protected]
<mailto:[email protected]>>:
Thanks, I am doing that now and hopefully it works (the issue
occurred very rarely, so I have to wait and see)
On Friday, 2 October 2015 17:16:35 UTC+1, Ryan Tanner wrote:
Don't create the replacement actor until you've received
a Terminated message for the original actor.
On Friday, October 2, 2015 at 8:58:54 AM UTC-6, Kostas
kougios wrote:
I create a named actor, stop it and recreate it with
the same name. Because stop is async, I end up with
exceptions like
akka.actor.InvalidActorNameException: actor name
[databaseServer] is not unique!
[info] at
akka.actor.dungeon.ChildrenContainer$NormalChildrenContainer.reserve(ChildrenContainer.scala:130)
[info] at
akka.actor.dungeon.Children$class.reserveChild(Children.scala:77)
[info] at
akka.actor.ActorCell.reserveChild(ActorCell.scala:373)
[info] at
akka.actor.dungeon.Children$class.makeChild(Children.scala:215)
[info] at
akka.actor.dungeon.Children$class.attachChild(Children.scala:42)
[info] at
akka.actor.ActorCell.attachChild(ActorCell.scala:373)
[info] at
akka.actor.ActorSystemImpl.actorOf(ActorSystem.scala:586)
[info] at
org.distributedrange.actors.StreamActor$$anonfun$2.apply(StreamActor.scala:122)
I get the same exception even if I set an
AtomicBoolean to true at:
override def postStop() = {
stopped.set(true)
super.postStop()
}
and then
while (!stopped.get) {
Thread.sleep(1)
}
Is there a way to "block" and wait till the actor stops?
(don't worry about the block part, it is only for
test cases)
Thanks
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the
Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to
[email protected] <mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
/Patrik --
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to a topic
in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/akka-user/u1TWqZYTKBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email
to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives:
https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google
Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Patrik Nordwall
Typesafe <http://typesafe.com/> - Reactive apps on the JVM
Twitter: @patriknw
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to a topic in the
Google Groups "Akka User List" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/akka-user/u1TWqZYTKBE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
--
Read the docs: http://akka.io/docs/
Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.