Commit graph

9050 commits

Author SHA1 Message Date
Roland
dca309c535 incorporate Patrik’s feedback
- rename to DynamicAccess
- rename to createInstanceFor / createClassFor
- fix a few little things
2012-02-10 11:36:23 +01:00
Roland
b193bcee04 incorporate Viktor’s review 2012-02-09 19:26:02 +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
Roland
15fa414d46 also add configurability section to eclipse example 2012-02-06 14:11:46 +01:00
Roland Kuhn
809000f9af Merge pull request #304 from jboner/wip-DOCS-∂π
Wip docs ∂π
2012-02-06 04:01:01 -08:00
Roland
4e12b72959 move Java code snippet into compiled class 2012-02-06 12:59:03 +01:00
Roland
96486428e1 add conf override to Pi sample, see #1763 2012-02-06 12:49:22 +01:00
Roland
9ba5043539 add router design rationale, see #1772 2012-02-06 12:18:08 +01:00
Peter Vlugter
34df500c92 Add comment about ssh config for release script 2012-02-06 12:06:36 +13:00
Peter Vlugter
3fbd18f0fa Update to ScalaSTM 0.5 (which includes Java API) 2012-02-06 11:34:47 +13:00
Viktor Klang
59d6e93af4 Making Akka more Android compliant :-) 2012-02-05 21:09:33 +01:00
Jonas Bonér
67d0b0807c Merge pull request #297 from jboner/wip-fix-multi-jvm-test-jboner
Fix running multi jvm test in parallel with other remoting tests. Fixes bug in RandomRouter.
2012-02-05 00:35:01 -08:00
Jonas Bonér
42f5af7fb0 fixes review comments 2012-02-05 09:19:57 +01:00
patriknw
1d6f350799 Merge pull request #300 from jboner/wip-1776-ser-patriknw
Find serializer by looking at interfaces and super classes. See #1766
2012-02-04 10:19:07 -08:00
Jonas Bonér
f855ff2add Fixed misc stuff after review.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-04 17:50:11 +01:00
Patrik Nordwall
bd3766d8a7 Performance improvement 2012-02-04 17:35:39 +01:00
Patrik Nordwall
d6d9446dd3 Improvements 2012-02-03 21:42:33 +01:00
Jonas Bonér
ff62a1cf2a Removed unnecessary config options.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 18:10:50 +01:00
Jonas Bonér
6abc3b33e3 Fixed bug in ScatterGatherFirstCompletedRouterSpec.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 18:09:13 +01:00
Jonas Bonér
c01ed6b436 Switched to ThreadLocalRandom.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 18:08:43 +01:00
Patrik Nordwall
612e909c48 Find serializer by looking at interfaces and super classes. See #1766 2012-02-03 17:32:32 +01:00
Jonas Bonér
2ec15db091 Merge branch 'master' into wip-fix-multi-jvm-test-jboner 2012-02-03 16:38:28 +01:00
Jonas Bonér
2ea6e97a41 Merge branch 'master' of github.com:jboner/akka 2012-02-03 16:31:56 +01:00
Jonas Bonér
a221722c41 Fixed minor typos in the futures docs.
Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 16:31:31 +01:00
Roland Kuhn
c7de179276 Merge pull request #298 from jboner/wip-1783-latest-HOCON-∂π
Viktor said: “just push!”
2012-02-03 06:37:29 -08:00
Roland Kuhn
4ded156bd0 Merge pull request #299 from jboner/wip-1782-timing-in-test-for-all-of-us
Wip 1782 timing in test for all of us
2012-02-03 06:36:15 -08:00
Viktor Klang
1e4d643183 Merge branch 'master' of github.com:jboner/akka 2012-02-03 15:30:11 +01:00
Viktor Klang
df67b92f63 Embedding ThreadLocalRandom from jsr166y 2012-02-03 15:29:58 +01:00
Roland Kuhn
3a5c20e228 Merge pull request #296 from jboner/wip-1779-slf4j-docs-∂π
update docs for SLF4J, see #1779
2012-02-03 06:03:38 -08:00
Roland
1758a50789 update to Havoc’s latest config lib from the serializable branch 2012-02-03 15:02:21 +01:00
Jonas Bonér
278658e031 Merge branch 'wip-fix-multi-jvm-test-jboner' of github.com:jboner/akka into wip-fix-multi-jvm-test-jboner 2012-02-03 15:00:55 +01:00
Viktor Klang
3267ce51a0 Merge branch 'master' of github.com:jboner/akka 2012-02-03 15:00:38 +01:00
Jonas Bonér
ec7772b786 Fixes bug in RandomRouter.
Fixes an interesting "bug" in RandomRouter. Tests failed on my 12 core Linux box. After some investigation I found that it hanged randomly inside the SecureRandom seed generator.

[JVM-Node4] "main" prio=10 tid=0x0000000001701000 nid=0x1942 runnable [0x00007fee631dc000]
[JVM-Node4]    java.lang.Thread.State: RUNNABLE
[JVM-Node4]   at java.io.FileInputStream.readBytes(Native Method)
[JVM-Node4]   at java.io.FileInputStream.read(FileInputStream.java:236)
[JVM-Node4]   at sun.security.provider.SeedGenerator$URLSeedGenerator.getSeedBytes(SeedGenerator.java:509)
[JVM-Node4]   at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:135)
[JVM-Node4]   at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:131)
[JVM-Node4]   at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:188)
[JVM-Node4]   - locked <0x00000007c3d84130> (a sun.security.provider.SecureRandom)
[JVM-Node4]   at java.security.SecureRandom.nextBytes(SecureRandom.java:450)
[JVM-Node4]   - locked <0x00000007c3d843d0> (a java.security.SecureRandom)
[JVM-Node4]   at java.security.SecureRandom.next(SecureRandom.java:472)
[JVM-Node4]   at java.util.Random.nextInt(Random.java:272)
[JVM-Node4]   at akka.routing.RandomLike$class.getNext$2(Routing.scala:466)

Puzzled at first I Googled the problem and found this bug report: http://bugs.sun.com/view_bug.do?bug_id=6521844

In short it is designed to block on /dev/random (on Linux) when the entropy pool is empty until some "environmental noise is gathered".

From the Linux manual:
"Hanging at generateSeed is not a bug, since that's what was designed:
    When the entropy pool is empty, reads from /dev/random will block until
    additional environmental noise is gathered.
    (Source: Linux Programmer's Manual, section 4)"

Fix was to switch to java.util.Random.

Fun one

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
2012-02-03 14:56:50 +01:00
Roland
93a506db5f fix SchedulerSpec, this time for real. 2012-02-03 14:52:10 +01:00
Roland
035a1d28a0 fix SchedulerSpec and ActorTimeoutSpec 2012-02-03 14:45:58 +01:00
patriknw
370e2d9818 Merge pull request #282 from jboner/wip-1310-err2-patriknw
Second stab at revised error handling. See #1310
2012-02-03 05:07:06 -08:00
Viktor Klang
22530b51e0 Adding more Scaladoc to Await and Awaitable 2012-02-03 13:59:38 +01:00
Patrik Nordwall
09e13e271b Merge branch 'master' into wip-1310-err2-patriknw
Conflicts:
	akka-actor/src/main/scala/akka/dispatch/AbstractDispatcher.scala
	akka-cluster/src/main/scala/akka/cluster/Cluster.scala
	akka-cluster/src/main/scala/akka/cluster/TransactionLog.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
2012-02-03 13:57:28 +01:00
Viktor Klang
fc144cf204 ScalaDoc can be stupid 2012-02-03 13:49:07 +01:00
Roland Kuhn
f62b50a41b add missing parens 2012-02-03 11:44:36 +01:00
Roland Kuhn
8090769730 change “Class[_]” into proper Java raw generics 2012-02-03 11:42:59 +01:00
Viktor Klang
30af127207 Merge branch 'master' of github.com:jboner/akka 2012-02-03 11:18:34 +01:00
Patrik Nordwall
eb4fc53051 Added cause to LogEventException and ajdusted logging in Future. See #1310 2012-02-03 11:15:42 +01:00
Roland
b57c9e8f5e update docs for SLF4J, see #1779 2012-02-03 10:47:56 +01:00
Patrik Nordwall
44b5ff056a Added reportFailure for logging in ExecutionContext. See #1310 2012-02-03 10:37:31 +01:00
Viktor Klang
96412ba1ad Adding ExecutionContext docs for futures, and adding a Java-friendly ExecutionContexts object 2012-02-03 10:35:05 +01:00
Roland
e5003c9795 use correct logSource in ActorLogging trait, fixes #1780 2012-02-03 10:11:03 +01:00
Roland Kuhn
f121e33231 Merge pull request #292 from jboner/wip-1644-programmatic-deploy-∂π
make it possible to programmatically deploy (e.g. remotely), see #1644
2012-02-03 00:54:51 -08:00
Roland
45140b465e Merge remote-tracking branch 'origin/master' into wip-1644-programmatic-deploy-∂π 2012-02-03 09:49:04 +01:00
Roland
c699c3d32d include review comments
- rename NoScope -> NoScopeGiven
- add scaladoc for scopes
- add some return types
2012-02-03 09:43:23 +01:00