Commit graph

150 commits

Author SHA1 Message Date
Patrik Nordwall
dc9ac4dc57 Java docs and sample of durable mailbox, see #2761
* Added abstract class DurableMessageQueueWithSerialization
(cherry picked from commit 49720e8cd09243ffea9f02c245e0053c126bf555)
2013-02-20 12:52:28 +01:00
Patrik Nordwall
2476831705 Rename event-handlers to loggers, see #2979
* Rename config akka.event-handlers to akka.loggers
* Rename config akka.event-handler-startup-timeout to
  akka.logger-startup-timeout
* Rename JulEventHandler to JavaLogger
* Rename Slf4jEventHandler to Slf4jLogger
* Change all places in tests and docs
* Deprecation, old still works, but with warnings
* Migration guide
* Test for the deprecated event-handler config
2013-02-05 11:19:02 +01:00
Viktor Klang
adfeb2c1f0 #2879 - updating copyright info 2013-01-09 11:38:00 +01:00
Roland
6c31d5313e rename AkkaSpec.{atTermination => afterTermination} 2013-01-03 17:17:12 +01:00
Roland
0f04239f67 move Duration classes according to scala 2.10 nightly and remove casts to FiniteDuration, see #2504 2012-10-11 15:18:10 -07:00
Björn Antonsson
0988101881 Fixes according to review. #2413 2012-10-02 10:21:46 +02:00
Björn Antonsson
309bb53d98 Reformating configuration and examples for PDF (Java). See #2413 2012-10-01 20:35:46 +02:00
Björn Antonsson
7dac4d8faf Clean up akka-file-mailbox for OSGi. #see 2497 2012-09-17 13:48:31 +02:00
Roland
8211fd6e8f change settings to FiniteDuration where applicable 2012-08-21 09:22:09 +02:00
Viktor Klang
1261fab3af Removing akka.util.NonFatal and replacing it with scala.util.control.NonFatal 2012-07-22 15:33:18 +02:00
Viktor Klang
1f6f2c1897 The unb0rkening 2012-06-29 14:07:38 +02:00
Viktor Klang
54a3a44bf8 #2292 - Removing akka.util.Duration etc and replace it with scala.concurrent.util.Duration 2012-06-29 13:33:20 +02:00
Viktor Klang
1a7f29aaec Making everything compile and tests pass 2012-06-28 15:33:49 +02:00
Viktor Klang
4ae26230b3 Merge branch 'master' into wip-scala210M4-√ 2012-06-26 12:15:46 +02:00
Viktor Klang
7fdb2c72e4 Making akka-mailbox* compile and tests green 2012-06-25 17:31:32 +02:00
Jonas Bonér
5f1016c57b Merged with master 2012-06-25 17:27:05 +02:00
Jonas Bonér
5fe9dcaf4e Cleaned up stuff around file-based mailbox 2012-06-24 14:43:46 +02:00
Roland
b60210362e make system.actorOf() non-blocking (and working), see #2031
- introducing RepointableActorRef, which starts out with an
  UnstartedActorCell which can cheaply be created; the Supervise()
  message will trigger child.activate() in the supervisor, which means
  that the actual creation (now with normal ActorCell) happens exactly
  in the right place and with the right semantics. Messages which were
  enqueued to the dummy cell are transferred atomically into the
  ActorCell (using normal .tell()), so message sends keep working
  exactly as they used to
- this enables getting rid of the brittle synchronization around
  RoutedActorRef by replacing that one with a RepointableActorRef
  subclass which creates RoutedActorCells upon activate(), with the nice
  benefit that there is no hurry then to get it right because the new
  cell is constructed “on the side”

misc fixes:

- InvalidMessageException is now actually enforced when trying to send
  “null”
- Mailboxes may be created without having an ActorCell, which can come
  in handy later, because the cell is only needed when this mailbox is
  going to be scheduled on some executor
- remove occurrences of Props(), which is equivalent to Props[Nothing],
  which is equivalent to «bug»
- add test case which verifies that context.actorOf is still synchronous
- plus all the stuff I have forgotten.
2012-06-13 17:57:56 +02:00
Brian Scully
6a415f0e9b * Add Circuit Breaker to akka.pattern for general use. Circuit breaker implementation as described by Michael T. Nygard in Release It!. Fixes #1734
* Uses finite state machine for three states: Closed, Open, Half-Open
    * Closed state allows calls through, and on sequential failures exceeding the max# set - transitions to Open state. Intervening successes cause the failure count to reset to 0
    * Open state throws a CircuitOpenException on every call until the reset timeout is reached which causes a transition to Half-Open state
    * Half-Open state will allow the next single call through, if it succeeds - transition to Closed state, if it fails - transition back to Open state, starting the reset timer again
  * Allow configuration for the call and reset timeouts, as well as the maximum number of sequential failures before opening
  * Supports async or synchronous call protection
  * Callbacks are supported for state entry into Closed, Open, Half-Open.  These are run in the supplied execution context
  * Both thrown exceptions and calls exceeding max call time are considered failures
  * Uses akka scheduler for timer events
  * Integrated into File-Based durable mailbox
  * Sample documented for other durable mailboxes
2012-06-01 08:24:47 -04:00
Viktor Klang
ee4a7ce76a Preparing mailbox-commons for bin compat 2012-05-23 16:27:30 +02:00
Viktor Klang
96c5c9392b Preparing the FileBasedMailbox for binary compatibility 2012-05-23 16:18:01 +02:00
Viktor Klang
3ba5db053a Merge branch 'master' into wip-2006-binary-compat-√ 2012-05-21 14:37:42 +02:00
patriknw
b9f7f4e4cc Merge pull request #452 from akka/wip-1755-protobuf-DaemonMsg-patriknw
Replace Java serialization of DaemonMsg by protobuf. See #1755
2012-05-21 01:40:43 -07:00
Viktor Klang
95db4bfd37 Moving out ConfigurationException from akka.config to akka 2012-05-16 17:04:13 +02:00
Patrik Nordwall
b70d7c6227 Reverted the change to serializeActorRef in DurableMessageSerialization. See #1755
* Discussed with Roland after seeing pull/457
2012-05-16 09:43:23 +02:00
Patrik Nordwall
8924080017 Create test-fixture for durable mailboxes. See #2061
* Improved DurableMailboxSpec for stand alone usage
* Changed build to publish DurableMailboxSpec in akka-mailboxes-common-test
* Changed documentation of durable mailboxes and added full example of
  how to implement a durable mailbox, with test
2012-05-15 16:11:00 +02:00
Patrik Nordwall
6dd017d6c1 Replace Java serialization of DaemonMsg by protobuf. See #1755
* Serializers for DaemonMsgCreate and DaemonMsgWatch
* Protobuf for DaemonMsgCreateProtocol, PropsProtocol,
  DeployProtocol, DaemonMsgWatchProtocol
* Removed unused MailboxProtocol.proto
* Fixed wrong serializeActorRef in DurableMessageSerialization
2012-05-15 10:50:05 +02:00
Viktor Klang
29df4a4702 Removing the community-maintained durable mailboxes, replacing the dep on commonsIo with the piece of code needed and switched to commonsIo for the FileBasedDurableMailboxSpec, also removed the amqp stubs, the spring stubs and other AkkaBuild residue 2012-05-08 15:07:05 +02:00
Viktor Klang
573892de94 Adding a multi-recipient test to the durable mailbox spec 2012-05-02 15:35:06 +02:00
Viktor Klang
42a80ec8b1 Adding more comprehensive tests for durable mailbox implementations 2012-05-02 14:43:06 +02:00
Roland
3699c6856e add docs for durMbx settings, see #1863 2012-03-05 17:48:38 +01:00
Roland
eaee16c7d3 include system.settings when constructing MailboxType, see #1864
- necessary to not have to construct one Settings object per
  MessageQueue
- added system.settings to DispatcherPrerequisites
2012-02-26 21:26:25 +01:00
Roland
b3dd85f6dd switch to dispatcher-scoped settings for durable mailboxes, see #1836
- also switch SBT settings to enable testing of durable mailboxes
  centrally (if so desired, just uncomment testMailbox line in build.sbt)
- automatically start mongod, beanstalkd or redis-server when running
  the respective tests (assumes that the binaries are in PATH)
- unify settings extraction from dispatcher config, sub-scoping by
  mailbox type name
2012-02-25 22:41:48 +01:00
Adam Lesperance
1cb657e02e Reword default config headers 2012-02-21 14:39:08 -06:00
Roland
2d765718cf Merge branch 'wip-1844-mailboxes-∂π' 2012-02-21 14:07:30 +01:00
Roland
882249c5cf rename durable mailboxes to message queues, see #1844
keep *MailboxType in order to not confuse users.
2012-02-21 13:40:05 +01:00
Roland
587950b863 fix BSONSerializer’s use of paths 2012-02-20 15:15:20 +01:00
Viktor Klang
b532211e71 Removing logging from MongoBasedMailbox and BSON serialization 2012-02-19 13:03:46 +01:00
Roland
2f3737195b split Mailbox and MessageQueue, see #1844
- this enables using any MessageQueue in BalancingDispatcher,
  CallingThreadDispatcher and in general leads to less conflation of
  concepts
- add MessageQueue.cleanUp(owner, deadLetterQueue) for the benefit of
  durable mailboxes
- change MailboxType.create to take an optional owner and generate only
  a MessageQueue, not a Mailbox
2012-02-19 10:28:56 +01:00
Viktor Klang
3a61b2f432 Removing durable mailbox logging 2012-02-16 21:58:02 +01:00
Roland
d2f28a06cd Merge remote-tracking branch 'origin/master' into wip-1750-remove-ReflectiveAccess-∂π 2012-02-10 11:41:47 +01:00
Jonas Bonér
51a218b87f Fixes ticket #1809 - Harmonize configuration option names.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-09 20:40:09 +01:00
Roland
2ce47d6bb5 Bye-bye ReflectiveAccess, introducing PropertyMaster, see #1750
- PropertyMaster is the only place in Akka which calls
  ClassLoader.getClass (apart from kernel, which might be special)
- all PropertyMaster methods (there are only three) take a ClassManifest
  of what is to be constructed, and they verify that the obtained object
  is actually compatible with the required type

Other stuff:
- noticed that I had forgotten to change to ExtendedActorSystem when
  constructing Extensions by ExtensionKey (damn you, reflection!)
- moved Serializer.currentSystem into JavaSerializer, because that’s the
  only one needing it (it’s only used in readResolve() methods)
- Serializers are constructed now with one-arg constructor taking
  ExtendedActorSystem (if that exists, otherwise no-arg as before), to
  allow JavaSerializer to do its magic; possibly necessary for others as
  well
- Removed all Option[ClassLoader] signatures
- made it so that the ActorSystem will try context class loader, then
  the class loader which loaded the class actually calling into
  ActorSystem.apply, then the loader which loaded ActorSystemImpl
- for the second of the above I added a (reflectively accessed hopefully
  safe) facility for getting caller Class[_] objects by using
  sun.reflect.Reflection; this is optional an defaults to None, e.g. on
  Android, which means that getting the caller’s classloader is done on
  a best effort basis (there’s nothing we can do because a StackTrace
  does not contain actual Class[_] objects).
- refactored DurableMailbox to contain the owner val and use that
  instead of declaring that in all subclasses
2012-02-09 11:56:43 +01:00
Patrik Nordwall
5033647176 Fixed things from review. See #1310 2012-02-01 17:38:12 +01:00
Patrik Nordwall
c447f46224 Some polish on the error handling. See #1310 2012-02-01 14:40:12 +01:00
Roland
4fb0858e55 remote cleanup: include feedback from Viktor and Patrik
- re-label Client/Server to Inbound/Outbound for netty settings
  description
- move to just using exactly one class loader for all reflective
  activities of the ActorSystem, which is either the context class
  loader or the one which loaded the ActorSystem’s class; document that
  putting Akka on boot class path will not work
- be more careful with initializing the Client- and ServerBootstrap
- rename Port to DesiredPortFromConfig to discourage misuse
- write test for NettySettings
- various small fixes
2012-01-30 11:57:24 +01:00
Roland
ac1ee9ae91 rework use of ClassLoaders, see #1736 2012-01-27 14:21:54 +01:00
Viktor Klang
08967d4149 Removing dead imports in durable mailboxes 2012-01-25 15:46:45 +01:00
Roland
d5c23bcb76 add ExtendedActorSystem to shield ActorSystemImpl
- add provider, guardian, systemGuardian and deathWatch to it
- make ActorSystemImpl extend ExtendedActorSystem
- use ExtendedActorSystem for creating extensions, thereby limiting the
  access extensions get to just those four published methods.
2012-01-24 11:33:40 +01:00
Viktor Klang
149fbea5a7 Updating Copyright as per #1660 2012-01-19 18:21:06 +01:00