Commit graph

53 commits

Author SHA1 Message Date
Roland
34a0f005b1 Merge branch 'master' into wip-1581-patterns-ask 2012-01-20 19:29:17 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00
Patrik Nordwall
fd68752fbe Another adjustment of pool-size 2012-01-18 19:49:38 +01:00
Roland
1daaee98aa Merge remote-tracking branch 'origin/master' into wip-1581-patterns-ask 2012-01-18 14:20:13 +01:00
Roland
2bed2cb954 move everything into package akka.pattern 2012-01-18 10:18:51 +01:00
Patrik Nordwall
387ffe1bce Limit of default-dispatcher pool size, since we run tests in parallel 2012-01-17 15:23:13 +01:00
Nikolay Botev
ce1d2f4721 akka.patterns.ask everywhere 2012-01-01 22:23:19 -08:00
Patrik Nordwall
df260f8939 Improvements based on feedback. See #1458 2011-12-21 19:02:06 +01:00
Patrik Nordwall
f772b0183e Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator
* Changed Dispatchers.lookup, keep configurators instead of dispatchers
* Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox
* How should we make it easy to configure priority mailbox?
* Changed tons tests
* Documentation and ScalaDoc is not updated yet
* Some tests in ActorModelSpec are temporary ignored due to failure
2011-12-21 13:27:50 +01:00
Viktor Klang
c904fd3913 Making TestLatch Awaitable and fixing tons of tests 2011-12-19 15:05:33 +01:00
Viktor Klang
e959493e12 Enormous merge with master which probably led to the indirect unfortunate deaths of several kittens 2011-12-14 17:36:39 +01:00
Roland
5eedbdd69f rename ActorSystem.stop() to .shutdown() 2011-12-14 01:06:20 +01:00
Roland
cb85778b12 remove ActorRef.stop()
- replace ActorRef.stop() by ActorRefFactory.stop(child) everywhere
- ActorCell “optimizes” this to remove the child from its childrenRefs
  in order to allow immediate recycling of the name
- the lost soul must have a place, for which the Locker has been
  created, where Davy Jones will happily rebind the soul to his ship
  (i.e. set “parent” to the locker to avoid mem leak) and periodically
  revisit it (.stop(), in case of that being lost in comm failure,
  similar .watch() to re-check liveness)
2011-12-14 00:10:53 +01:00
Viktor Klang
b32cbbc764 Renaming Block to Await, renaming sync to result, renaming on to ready, Await.ready and Await.result looks and reads well 2011-12-12 22:50:08 +01:00
Viktor Klang
d8fe6a5509 Removing Future.get 2011-12-12 22:24:17 +01:00
Viktor Klang
3b1330c6d7 Tests are green with new Futures, consider this a half-way-there marker 2011-12-11 00:40:52 +01:00
Patrik Nordwall
f7d6393027 Removed actorOf methods from AkkaSpec. See #1439 2011-12-07 11:10:54 +01:00
Roland
c4ed57100e make Jenkins wait for Davy Jones
- AkkaSpecSpec failed with nothing in the locker, but only on Jenkins
- cause: Davy Jones doesn’t get a chance to run because nobody actually
  waits for his processing
- thus, give him permission to leave this world and have him confirm
  that
2011-12-06 22:50:19 +01:00
Roland
9d7597c728 Merge branch master into wip-ActorPath-rk
Had to make Davy Jones a bit more robust, i.e. put him into a different
system to guarantee survival until all messages are delivered.
2011-12-05 22:46:34 +01:00
Roland
cdc5492101 correct spelling of Davy Jones 2011-12-05 21:03:05 +01:00
Roland
c0c9487451 make testActor spew out uncollected messages after test end
(so you don’t need expectNoMsg after tests)
2011-12-05 19:03:01 +01:00
Roland
eeca88d674 add test for “unorderly” shutdown of ActorSystem by PoisonPill
- uncovered nasty endless loop bug wrt. dead letters and a dead listener
- fixing that bug removed the MainBusReaper (sigh)
- also fix compilation of tutorial-first, but that REALLY needs to be
  changed not to create RoutedActorRef using new!
2011-12-05 15:18:22 +01:00
Patrik Nordwall
c8a1a96310 Updated config documentation 2011-12-05 10:41:36 +01:00
Roland
e38cd19af9 Merge branch 'master' into wip-ActorPath-rk 2011-12-02 13:31:48 +01:00
Patrik Nordwall
b488d70f54 Fixed several memory and thread leaks. See #1404
* Dispatchers need Scheduler to be able to shutdown themselves. Stop Scheduler after dispatchers.
* Changed CallingThreadDispatcher global object to Extension, since it holds map of references to mailboxes. Will be GC:ed when system is GC:ed.
* Made testActor lazy, since it is not used in all tests, and it creates CallingThreadDispatcher.
* Activated some java tests that were not running
* Many tests were not stopping created ActorSystems. VERY IMPORTANT TO STOP ActorSystem in tests. Use AkkaSpec as much as possible.
* Used profiler to verify (and find) dangling ActorSystemImpl and threads from dispatchers.
* FutureSpec creates ForkJoinPool threads that are not cleared, but number of threads don't grow so it's not a problem.
2011-12-02 09:48:21 +01:00
Roland
7e4333a612 fix actor creation with duplicate name within same message invocation
- ActorCell will pre-fill the childrenRefs with the reserved name in
  order to detect duplicates
- also clean up some test outputs (some ActorSystems forgot to fall back
  to testConf so they did not get the TestEventListener anymore)
- fix race in start-up of LoggingReceiveSpec by ignoring messages from
  testActor start (never was slow enough on my machine to trigger =>
  thank you Jenkins, again!)
- represent actors in logging only by their path, i.e. remote Actor[...]
  decoration
- fix automatic naming of AkkaSpec ActorSystems after the true class
  name of the test spec
2011-11-30 22:19:48 +01:00
Patrik Nordwall
b56201ab7f Updated to latest config lib and changed how reference config files are loaded.
* Config lib 4f3a91f
* All reference files named reference.conf, all will be loaded
* Usage of ConfigFactor.load as default way
* Extensions use same config as ActorSystem.settings.config
2011-11-29 11:56:41 +01:00
Patrik Nordwall
87a22e4d28 stdout-loglevel = WARNING in AkkaSpec 2011-11-28 14:59:41 +01:00
Patrik Nordwall
179399296e Modularize configuration. See #1361
* Split config reference to one for each module/extension.
* Adjusted signature of registerExtension to avoid race of extension init
* Moved Duration.dilated to testkit
* TestKitExtension
* RemoteExtension
* SerializationExtension
* Durable mailboxes extensions
* Fixed broken serialization bindings and added test
* Updated configuration documentation
* System properties akka.remote.hostname akka.remote.port replaced with akka.remote.server.hostname and akka.remote.server.port
* Adjustments of ActorSystem initialization. Still don't like the two-phase constructor/init flow. Very fragile for changes.

Review fixes. SerializationExtension
2011-11-23 20:31:58 +01:00
Viktor Klang
c56341b3a6 Fixing FIXME to rename isShutdown to isTerminated 2011-11-23 19:03:56 +01:00
Roland
263e2d495d Merge branch 'extensions' into master 2011-11-21 15:58:01 +01:00
Patrik Nordwall
a9217cec7b Merge branch 'master' into wip-1141-config-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorSystem.scala
2011-11-19 09:18:57 +01:00
Roland
6a8e516b6c change source tag in log events from AnyRef to String
- ensure that no “complex” things are attached to a LogEvent (think
  serialization)
- ensure no escaping the “this” reference via LoggingBus during
  constructors (e.g. ActorSystem)
- change it so that
    + Actor/ActorRef are represented by their address
    + Class[_] by simpleName
    + String by itself
- this means that people need to think a little more while deciding how
  “this” should look like in logging (which I think is a good thing)
2011-11-18 12:24:04 +01:00
Patrik Nordwall
50faf18bb8 Changed to parseString instead of parseReader 2011-11-18 11:17:08 +01:00
Patrik Nordwall
4b8f11ea92 Replaced akka.config with new configuration utility. See #1141 and see #1342
* All default values removed from code and loaded from akka-actor-reference.conf, located in src/main/resources (included in jar)
* Default test configuration included in AkkaSpec instead of using akka.test.conf, avoids problems when running test (in IDE) and forgetting to use -Dakka.mode=test.
* System.properties used first, if availble
* Next step will be to split akka-actor-reference.conf in separate -reference for each module
2011-11-18 10:05:40 +01:00
Roland
d381b72061 rename app: ActorSystem to system everywhere 2011-11-17 12:36:35 +01:00
Roland
5cc228e7b4 mark timing tags so they can be omitted on Jenkins 2011-11-16 19:34:37 +01:00
Roland
648661c548 clean up initialization of ActorSystem, fixes #1050
- create ActorSystemImpl trait to make ActorSystem fully abstract
- add Java API for constructing (ActorSystem.create(...))
- only go through factory methods because .start() has become necessary
- rename all user-facing occurrences of “app” to “system” (Actor trait
  and TestKit/AkkaSpec)
- pass ActorSystemImpl to ActorRefs upon creation, which means that
  actorOf() and friends need such an argument, which must be provided to
  the ActorRefProvider by the ActorRefFactory implementation
2011-11-16 17:18:36 +01:00
Roland
02a5cd081c remove ActorRef from Failed/ChildTerminated and make some warnings nicer
- the same information is transmitted as sender, hence enabling
  ChildTerminated to become a singleton
- make lastSender accessible in TestKit (needed now for DeathWatchSpec)
- fix nasty infinite loop when logging at the wrong moment during
  shutdown
2011-11-13 00:19:56 +01:00
Roland
53353d7031 rename MainBus to EventStream (incl. field in ActorSystem) 2011-11-10 21:01:37 +01:00
Roland
945b1aedf9 rename akka.AkkaApplication to akka.actor.ActorSystem
Renaming it to System did not appeal after seeing that such a thing is
already imported from Predef ...
2011-11-10 21:00:01 +01:00
Roland
a747ef7856 Merge remote branch 'origin/master' into logging
BalancingDispatcherModelSpec is currently broken, leaves count==1 in
wavesOfActors test, committed anyway in order to check out where it
broke before this merge
2011-11-09 14:56:05 +01:00
Roland
b35f8dece0 incorporate review from Viktor & Jonas
- use intercept[]{} in PinnedActorSpec
- make Logging.logLevel_= thread safe
- add lots of scaladoc
- make more friendly to Java API
2011-11-03 18:56:20 +01:00
Roland
55f896226c some polishing of new Logging
- add scaladoc
- remove (empty) EventHandler.scala
- make BugLogging more of an implementation detail, i.e. use the
  Logging() factories to get a Logging implementation.
2011-10-29 19:10:58 +02:00
Roland
d1e0f411ef clean up application structure
- introduce common parent for guardian and systemGuardian
- install deathWatch chain to ensure proper shutdown upon guardian’s
  death
- re-install stdout logger before detaching default loggers
- await app termination after running AkkaSpec tests (max 5sec, with
  warning logged if not stopped)
2011-10-28 17:15:10 +02:00
Jonas Bonér
9bf9cea0d9 Removed trailing whitespace 2011-10-28 15:55:47 +02:00
Roland
f46c6dc533 introducing: MainBus feat. LoggingBus
most tests passing, everything compiling, but docs not updated and nasty
thread-leak preventing me from running the whole test-suite (which is
the reason for this commit: I want to chase down that one first).

- the app.mainbus is classified by Class[_] (currently lookup, will
  possibly change to sub-class-aware) and accepts AnyRef messages
- LoggingBus handles akka.event-handlers from config specially:
  + start them as system services, supervised by SystemGuardian
  + keep their subscriptions in sync when logLevel_= is called
  + send them InitializeLogger(bus) message before subscribing them (so
    they can register for extras like Mute/UnMute)
- two-phased start-up: first phase with actor-less stdout logging, then
  subscription of config loggers, then remove stdout logger (logLevels
  configurable separately)
- MainBusReaper watches registered receivers and unsubscribes them upon
  death (started in phase 2)
- logger factory on Logging object, needs app/bus and log source;
  default instance in app.log
2011-10-27 12:36:22 +02:00
Roland
172ab31f2a improve some, but tests are STILL FAILING
- AkkaApplication.stop() will stop the guardian; when that stops, it
  will send ChildTerminated to the BubbleWalker, who will then complete
  a Promise
- AkkaApplication.terminationFuture is that Promise and available for
  registration of onComplete callback, used now to shutdown the
  Scheduler
- AkkaSpec extends BeforeAndAfterAll and uses that to call app.stop(),
  exposing atStartup() and atTermination() overridable hooks
- fixed some tests
2011-10-20 20:45:02 +02:00
Viktor Klang
474787a81d Renaming createActor to actorOf 2011-10-18 17:56:23 +02:00
Roland
9444ed8beb introduce nicer AkkaSpec constructor and fix FSMActorSpec 2011-10-12 11:35:45 +02:00