implemented waiting for pending transactions to complete before aborting + config

This commit is contained in:
Jonas Boner 2009-07-04 12:06:07 +02:00
parent d75d769351
commit 3830aed805
6 changed files with 602 additions and 211 deletions

574
akka.iws
View file

@ -1,27 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project relativePaths="false" version="4"> <project relativePaths="false" version="4">
<component name="BookmarkManager"> <component name="BookmarkManager">
<editor_bookmark url="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" line="538" description="override def toString(): String = &quot;Actor[&quot; + uuid ..." />
<editor_bookmark url="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java" line="40" description="conf.configureActiveObjects(" /> <editor_bookmark url="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java" line="40" description="conf.configureActiveObjects(" />
<commander_bookmark type="package" url="file://$PROJECT_DIR$/kernel/src/main/scala/stm" /> <commander_bookmark type="package" url="file://$PROJECT_DIR$/kernel/src/main/scala/stm" />
<commander_bookmark type="package" url="file://$PROJECT_DIR$/kernel/src/main/scala/actor" /> <commander_bookmark type="package" url="file://$PROJECT_DIR$/kernel/src/main/scala/actor" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="212ccd86-01aa-4780-a2f0-0d130be5abd2" name="Test" comment=""> <list default="true" id="212ccd86-01aa-4780-a2f0-0d130be5abd2" name="Test" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/test/scala/PersistentActorSpec.scala" afterPath="$PROJECT_DIR$/kernel/src/test/scala/PersistentActorSpec.scala" /> <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/kernel/src/test/scala/TransactionClasherSpec.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/PersistentNestedStateTest.java" afterPath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/PersistentNestedStateTest.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/state/CassandraStorage.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/state/CassandraStorage.scala" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/stm/TransactionManagement.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/stm/TransactionManagement.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala" afterPath="$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/kernel/src/test/scala/AllTests.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/akka.iws" afterPath="$PROJECT_DIR$/akka.iws" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/akka.iws" afterPath="$PROJECT_DIR$/akka.iws" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RemotePersistentStateTest.java" afterPath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RemotePersistentStateTest.java" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/reactor/Reactor.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/reactor/Reactor.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/bin/start-akka-server.sh" afterPath="$PROJECT_DIR$/bin/start-akka-server.sh" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/state/State.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/state/State.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java" afterPath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/AllTests.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala" afterPath="$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala" />
<change type="MOVED" beforePath="$PROJECT_DIR$/kernel/src/test/scala/ActorTest.scala" afterPath="$PROJECT_DIR$/kernel/src/test/scala/ActorSpec.scala" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala" afterPath="$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala" />
</list> </list>
<list readonly="true" id="6e842704-fac6-40e9-8a67-d02385f87db9" name="Default" comment="&#10;# Brief commit desciption here&#10;&#10;# Full commit description here (comment lines starting with '#' will not be included)&#10;&#10;" /> <list readonly="true" id="6e842704-fac6-40e9-8a67-d02385f87db9" name="Default" comment="&#10;# Brief commit desciption here&#10;&#10;# Full commit description here (comment lines starting with '#' will not be included)&#10;&#10;" />
<ignored path=".idea/workspace.xml" /> <ignored path=".idea/workspace.xml" />
@ -172,19 +163,6 @@
<option name="CONDITION" value="" /> <option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" /> <option name="LOG_MESSAGE" value="" />
</breakpoint> </breakpoint>
<breakpoint url="file://$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala" line="55" class="Class at Transaction.scala:55" package="">
<option name="ENABLED" value="true" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
<breakpoint url="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala" line="6" class="Class at RemoteSupervisorSpec.scala:6" package=""> <breakpoint url="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala" line="6" class="Class at RemoteSupervisorSpec.scala:6" package="">
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
<option name="LOG_ENABLED" value="false" /> <option name="LOG_ENABLED" value="false" />
@ -211,20 +189,7 @@
<option name="CONDITION" value="" /> <option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" /> <option name="LOG_MESSAGE" value="" />
</breakpoint> </breakpoint>
<breakpoint url="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" line="203" class="Class at Actor.scala:203" package=""> <breakpoint url="file://$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala" line="55" class="Class at Transaction.scala:55" package="">
<option name="ENABLED" value="true" />
<option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="COUNT_FILTER_ENABLED" value="false" />
<option name="COUNT_FILTER" value="0" />
<option name="CONDITION_ENABLED" value="false" />
<option name="CLASS_FILTERS_ENABLED" value="false" />
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
<breakpoint url="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" line="217" class="Class at Actor.scala:217" package="">
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
<option name="LOG_ENABLED" value="false" /> <option name="LOG_ENABLED" value="false" />
<option name="LOG_EXPRESSION_ENABLED" value="false" /> <option name="LOG_EXPRESSION_ENABLED" value="false" />
@ -300,6 +265,24 @@
<component name="FileColors" enabled="false" enabledForTabs="false" /> <component name="FileColors" enabled="false" enabledForTabs="false" />
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf>
<file leaf-file-name="TransactionClasherSpec.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/TransactionClasherSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="52" column="6" selection-start="1136" selection-end="1136" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="akka.conf" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/config/akka.conf">
<provider selected="true" editor-type-id="text-editor">
<state line="17" column="55" selection-start="599" selection-end="599" vertical-scroll-proportion="0.3767313">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="InMemoryActorSpec.scala" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="InMemoryActorSpec.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/InMemoryActorSpec.scala"> <entry file="file://$PROJECT_DIR$/kernel/src/test/scala/InMemoryActorSpec.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -309,10 +292,19 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="ActiveObjectGuiceConfiguratorTest.java" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="SupervisorSpec.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/ActiveObjectGuiceConfiguratorTest.java"> <entry file="file://$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="89" column="0" selection-start="3208" selection-end="3208" vertical-scroll-proportion="0.0"> <state line="36" column="6" selection-start="852" selection-end="852" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="RemoteSupervisorSpec.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="61" column="6" selection-start="1407" selection-end="1407" vertical-scroll-proportion="0.33114755">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -321,25 +313,34 @@
<file leaf-file-name="Actor.scala" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="Actor.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala"> <entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="254" column="0" selection-start="9348" selection-end="9348" vertical-scroll-proportion="0.0"> <state line="53" column="11" selection-start="2206" selection-end="2206" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="ActiveObject.scala" pinned="false" current="true" current-in-tab="true"> <file leaf-file-name="Reactor.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala"> <entry file="file://$PROJECT_DIR$/kernel/src/main/scala/reactor/Reactor.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="255" column="18" selection-start="10360" selection-end="10360" vertical-scroll-proportion="0.51359224"> <state line="36" column="6" selection-start="981" selection-end="981" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="Foo.java" pinned="false" current="false" current-in-tab="false"> <file leaf-file-name="TransactionManagement.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/Foo.java"> <entry file="file://$PROJECT_DIR$/kernel/src/main/scala/stm/TransactionManagement.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="14" column="9" selection-start="297" selection-end="297" vertical-scroll-proportion="0.0"> <state line="11" column="18" selection-start="236" selection-end="237" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Transaction.scala" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="10" column="34" selection-start="228" selection-end="256" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -358,12 +359,6 @@
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="changedFiles"> <option name="changedFiles">
<list> <list>
<option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/PersistentStatefulNested.java" />
<option value="$PROJECT_DIR$/kernel/src/test/scala/InMemoryActorSpec.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/state/State.scala" />
<option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RemotePersistentStateTest.java" />
<option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/PersistentNestedStateTest.java" />
<option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java" />
<option value="$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala" /> <option value="$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/state/CassandraStorage.scala" /> <option value="$PROJECT_DIR$/kernel/src/main/scala/state/CassandraStorage.scala" />
<option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/AllTests.java" /> <option value="$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/AllTests.java" />
@ -374,6 +369,12 @@
<option value="$PROJECT_DIR$/kernel/src/test/scala/AllTests.scala" /> <option value="$PROJECT_DIR$/kernel/src/test/scala/AllTests.scala" />
<option value="$PROJECT_DIR$/kernel/src/test/scala/PersistentActorSpec.scala" /> <option value="$PROJECT_DIR$/kernel/src/test/scala/PersistentActorSpec.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala" /> <option value="$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/reactor/Reactor.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/stm/TransactionManagement.scala" />
<option value="$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala" />
<option value="$PROJECT_DIR$/kernel/src/test/scala/TransactionClasherSpec.scala" />
<option value="$PROJECT_DIR$/config/akka.conf" />
</list> </list>
</option> </option>
</component> </component>
@ -519,6 +520,28 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka-kernel" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Maven: org.scala-lang:scala-library:2.7.5" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="scala-library-2.7.5.jar" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="akka" /> <option name="myItemId" value="akka" />
@ -1530,6 +1553,92 @@
<option name="myItemId" value="akka" /> <option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="&lt; 1.6 &gt;" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="&lt; 1.6 &gt;" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="classes.jar" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="&lt; 1.6 &gt;" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="classes.jar" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lang" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="Libraries" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.LibraryGroupNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="&lt; 1.6 &gt;" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="classes.jar" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="lang" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="RuntimeException" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ClassTreeNode" />
</PATH_ELEMENT>
</PATH> </PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
@ -1635,6 +1744,90 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="WEB-INF" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="classes" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="se" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="scalablesolutions" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="kernel" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="stm" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="WEB-INF" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="classes" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="se" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="scalablesolutions" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="kernel" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="state" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH> <PATH>
<PATH_ELEMENT> <PATH_ELEMENT>
<option name="myItemId" value="akka" /> <option name="myItemId" value="akka" />
@ -1699,6 +1892,24 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT> </PATH_ELEMENT>
</PATH> </PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="akka" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane> </subPane>
</component> </component>
<component name="ProjectReloadState"> <component name="ProjectReloadState">
@ -1732,7 +1943,7 @@
<property name="dynamic.classpath" value="false" /> <property name="dynamic.classpath" value="false" />
<property name="MemberChooser.showClasses" value="true" /> <property name="MemberChooser.showClasses" value="true" />
<property name="project.structure.side.proportion" value="0.2" /> <property name="project.structure.side.proportion" value="0.2" />
<property name="options.lastSelected" value="preferences.sourceCode.Scala" /> <property name="options.lastSelected" value="preferences.pluginManager" />
<property name="GoToClass.toSaveIncludeLibraries" value="false" /> <property name="GoToClass.toSaveIncludeLibraries" value="false" />
<property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" /> <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
</component> </component>
@ -1745,8 +1956,8 @@
<recent name="actor" /> <recent name="actor" />
</key> </key>
</component> </component>
<component name="RunManager" selected="JUnit.ActiveObjectGuiceConfiguratorTest.testActiveObjectInvocation"> <component name="RunManager" selected="JUnit.All Tests Scala">
<configuration default="false" name="ActiveObjectGuiceConfiguratorTest.testActiveObjectInvocation" type="JUnit" factoryName="JUnit" temporary="true" enabled="false" merge="false" sample_coverage="true" runner="emma"> <configuration default="false" name="InMemoryStateTest.testRefShouldRollbackStateForStatefulServerInCaseOfFailure" type="JUnit" factoryName="JUnit" temporary="true" enabled="false" merge="false" sample_coverage="true" runner="emma">
<pattern> <pattern>
<option name="PATTERN" value="se.scalablesolutions.akka.api.*" /> <option name="PATTERN" value="se.scalablesolutions.akka.api.*" />
<option name="ENABLED" value="true" /> <option name="ENABLED" value="true" />
@ -1755,10 +1966,10 @@
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" /> <option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="se.scalablesolutions.akka.api" /> <option name="PACKAGE_NAME" value="se.scalablesolutions.akka.api" />
<option name="MAIN_CLASS_NAME" value="se.scalablesolutions.akka.api.ActiveObjectGuiceConfiguratorTest" /> <option name="MAIN_CLASS_NAME" value="se.scalablesolutions.akka.api.InMemoryStateTest" />
<option name="METHOD_NAME" value="testActiveObjectInvocation" /> <option name="METHOD_NAME" value="testRefShouldRollbackStateForStatefulServerInCaseOfFailure" />
<option name="TEST_OBJECT" value="method" /> <option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" value="" /> <option name="VM_PARAMETERS" value="-Daspectwerkz.transform.dump=*" />
<option name="PARAMETERS" value="" /> <option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" /> <option name="ENV_VARIABLES" />
@ -1770,8 +1981,12 @@
<envs> <envs>
<env name="AKKA_HOME" value="$PROJECT_DIR$" /> <env name="AKKA_HOME" value="$PROJECT_DIR$" />
</envs> </envs>
<RunnerSettings RunnerId="Run" /> <RunnerSettings RunnerId="Debug">
<ConfigurationWrapper RunnerId="Run" /> <option name="DEBUG_PORT" value="63648" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<ConfigurationWrapper RunnerId="Debug" />
<method> <method>
<option name="AntTarget" enabled="false" /> <option name="AntTarget" enabled="false" />
<option name="Make" enabled="false" /> <option name="Make" enabled="false" />
@ -2386,7 +2601,7 @@
<option name="Maven.BeforeRunTask" enabled="false" /> <option name="Maven.BeforeRunTask" enabled="false" />
</method> </method>
</configuration> </configuration>
<configuration default="false" name="InMemStatefulActor" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma"> <configuration default="false" name="InMemoryActorSpec" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma">
<module name="akka-kernel" /> <module name="akka-kernel" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" /> <option name="ALTERNATIVE_JRE_PATH" value="" />
@ -2420,7 +2635,7 @@
<option name="Maven.BeforeRunTask" enabled="false" /> <option name="Maven.BeforeRunTask" enabled="false" />
</method> </method>
</configuration> </configuration>
<configuration default="false" name="PersistentActor" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma"> <configuration default="false" name="PersistentActorSpec" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma">
<module name="akka-kernel" /> <module name="akka-kernel" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" /> <option name="ALTERNATIVE_JRE_PATH" value="" />
@ -2482,7 +2697,7 @@
<option name="Maven.BeforeRunTask" enabled="false" /> <option name="Maven.BeforeRunTask" enabled="false" />
</method> </method>
</configuration> </configuration>
<configuration default="false" name="REST" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma"> <configuration default="false" name="RestTest" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma">
<module name="akka-fun-test-java" /> <module name="akka-fun-test-java" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" /> <option name="ALTERNATIVE_JRE_PATH" value="" />
@ -2578,6 +2793,40 @@
<option name="Maven.BeforeRunTask" enabled="false" /> <option name="Maven.BeforeRunTask" enabled="false" />
</method> </method>
</configuration> </configuration>
<configuration default="false" name="TransactionClasherSpec" type="JUnit" factoryName="JUnit" enabled="false" merge="false" sample_coverage="true" runner="emma">
<module name="akka-kernel" />
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" value="" />
<option name="PACKAGE_NAME" value="" />
<option name="MAIN_CLASS_NAME" value="se.scalablesolutions.akka.kernel.actor.TransactionClasherSpec" />
<option name="METHOD_NAME" value="" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
<option name="ENV_VARIABLES" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="ADDITIONAL_CLASS_PATH" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="moduleWithDependencies" />
</option>
<envs>
<env name="AKKA_HOME" value="$PROJECT_DIR$" />
</envs>
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="64964" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
<RunnerSettings RunnerId="Run" />
<ConfigurationWrapper RunnerId="Debug" />
<ConfigurationWrapper RunnerId="Run" />
<method>
<option name="AntTarget" enabled="false" />
<option name="Make" enabled="false" />
<option name="Maven.BeforeRunTask" enabled="false" />
</method>
</configuration>
<configuration default="false" name="Scala Console" type="ScalaScriptConsoleRunConfiguration" factoryName="Scala Console"> <configuration default="false" name="Scala Console" type="ScalaScriptConsoleRunConfiguration" factoryName="Scala Console">
<module name="" /> <module name="" />
<setting name="vmparams" value="" /> <setting name="vmparams" value="" />
@ -2590,7 +2839,7 @@
<option name="Maven.BeforeRunTask" enabled="false" /> <option name="Maven.BeforeRunTask" enabled="false" />
</method> </method>
</configuration> </configuration>
<list size="23"> <list size="24">
<item index="0" class="java.lang.String" itemvalue="Application.Kernel" /> <item index="0" class="java.lang.String" itemvalue="Application.Kernel" />
<item index="1" class="java.lang.String" itemvalue="JUnit.AllTests Java" /> <item index="1" class="java.lang.String" itemvalue="JUnit.AllTests Java" />
<item index="2" class="java.lang.String" itemvalue="JUnit.All Tests Scala" /> <item index="2" class="java.lang.String" itemvalue="JUnit.All Tests Scala" />
@ -2606,14 +2855,15 @@
<item index="12" class="java.lang.String" itemvalue="JUnit.SupervisorSpec" /> <item index="12" class="java.lang.String" itemvalue="JUnit.SupervisorSpec" />
<item index="13" class="java.lang.String" itemvalue="JUnit.ActorSpec" /> <item index="13" class="java.lang.String" itemvalue="JUnit.ActorSpec" />
<item index="14" class="java.lang.String" itemvalue="JUnit.RemoteActorSpec" /> <item index="14" class="java.lang.String" itemvalue="JUnit.RemoteActorSpec" />
<item index="15" class="java.lang.String" itemvalue="JUnit.InMemStatefulActor" /> <item index="15" class="java.lang.String" itemvalue="JUnit.InMemoryActorSpec" />
<item index="16" class="java.lang.String" itemvalue="JUnit.PersistentActor" /> <item index="16" class="java.lang.String" itemvalue="JUnit.PersistentActorSpec" />
<item index="17" class="java.lang.String" itemvalue="JUnit.CamelSpec" /> <item index="17" class="java.lang.String" itemvalue="JUnit.CamelSpec" />
<item index="18" class="java.lang.String" itemvalue="JUnit.REST" /> <item index="18" class="java.lang.String" itemvalue="JUnit.RestTest" />
<item index="19" class="java.lang.String" itemvalue="JUnit.JerseySpec" /> <item index="19" class="java.lang.String" itemvalue="JUnit.JerseySpec" />
<item index="20" class="java.lang.String" itemvalue="JUnit.RemoteSupervisorSpec" /> <item index="20" class="java.lang.String" itemvalue="JUnit.RemoteSupervisorSpec" />
<item index="21" class="java.lang.String" itemvalue="Scala Console.Scala Console" /> <item index="21" class="java.lang.String" itemvalue="JUnit.InMemoryStateTest.testRefShouldRollbackStateForStatefulServerInCaseOfFailure" />
<item index="22" class="java.lang.String" itemvalue="JUnit.ActiveObjectGuiceConfiguratorTest.testActiveObjectInvocation" /> <item index="22" class="java.lang.String" itemvalue="JUnit.TransactionClasherSpec" />
<item index="23" class="java.lang.String" itemvalue="Scala Console.Scala Console" />
</list> </list>
<configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false"> <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
<Host>localhost</Host> <Host>localhost</Host>
@ -2690,20 +2940,20 @@
</todo-panel> </todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="4" y="22" width="1916" height="1178" extended-state="6" /> <frame x="4" y="22" width="1436" height="878" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22388859" sideWeight="0.6660517" order="5" side_tool="false" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22388859" sideWeight="0.6660517" order="5" side_tool="false" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32749078" sideWeight="0.5" order="6" side_tool="false" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32749078" sideWeight="0.5" order="6" side_tool="false" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.1751473" sideWeight="0.599631" order="1" side_tool="false" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23576063" sideWeight="0.4489796" order="1" side_tool="false" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16818425" sideWeight="0.24354243" order="0" side_tool="true" x="1609" y="144" width="252" height="862" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.16818425" sideWeight="0.24354243" order="0" side_tool="true" x="1609" y="144" width="252" height="862" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32380074" sideWeight="0.5" order="1" side_tool="false" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32380074" sideWeight="0.5" order="1" side_tool="false" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32841328" sideWeight="0.0" order="14" side_tool="false" /> <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32780612" sideWeight="0.0" order="14" side_tool="false" />
<window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="15" side_tool="false" /> <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="15" side_tool="false" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" /> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24906267" sideWeight="0.78228784" order="1" side_tool="false" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24906267" sideWeight="0.78228784" order="1" side_tool="false" />
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32749078" sideWeight="0.5" order="9" side_tool="false" /> <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32749078" sideWeight="0.5" order="9" side_tool="false" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39391145" sideWeight="0.0" order="2" side_tool="false" x="4" y="22" width="1436" height="878" /> <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.54209185" sideWeight="0.0" order="2" side_tool="false" x="4" y="22" width="1436" height="878" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.36346865" sideWeight="0.5" order="3" side_tool="false" /> <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.36346865" sideWeight="0.5" order="3" side_tool="false" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32694763" sideWeight="0.5" order="13" side_tool="false" /> <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32694763" sideWeight="0.5" order="13" side_tool="false" />
<window_info id="Web Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32822478" sideWeight="0.5" order="16" side_tool="false" /> <window_info id="Web Preview" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32822478" sideWeight="0.5" order="16" side_tool="false" />
@ -2757,74 +3007,100 @@
<option name="FILTER_TARGETS" value="false" /> <option name="FILTER_TARGETS" value="false" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/state/CassandraStorage.scala"> <entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar!/java/lang/Throwable.class">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="37" column="65" selection-start="1300" selection-end="1300" vertical-scroll-proportion="0.0"> <state line="5" column="47" selection-start="181" selection-end="181" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar!/java/lang/Exception.class">
<provider selected="true" editor-type-id="text-editor">
<state line="5" column="47" selection-start="181" selection-end="181" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="jar:///System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar!/java/lang/RuntimeException.class">
<provider selected="true" editor-type-id="text-editor">
<state line="5" column="52" selection-start="186" selection-end="186" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="jar://$MAVEN_REPOSITORY$/org/scala-lang/scala-library/2.7.5/scala-library-2.7.5-sources.jar!/scala/Predef.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="50" column="57" selection-start="1905" selection-end="1905" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/reactor/Reactor.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="36" column="6" selection-start="981" selection-end="981" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/WEB-INF/classes/se/scalablesolutions/akka/kernel/state/InMemoryTransactionalVector.class">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/WEB-INF/classes/se/scalablesolutions/akka/kernel/stm/Transaction.class">
<provider selected="true" editor-type-id="text-editor">
<state line="26" column="0" selection-start="1694" selection-end="1694" vertical-scroll-proportion="0.7908497">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/WEB-INF/classes/se/scalablesolutions/akka/kernel/stm/TransactionManagement.class">
<provider selected="true" editor-type-id="text-editor">
<state line="24" column="0" selection-start="1817" selection-end="1817" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="53" column="11" selection-start="2206" selection-end="2206" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/stm/TransactionManagement.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="18" selection-start="236" selection-end="237" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/stm/Transaction.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="10" column="34" selection-start="228" selection-end="256" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/TransactionClasherSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="52" column="6" selection-start="1136" selection-end="1136" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala"> <entry file="file://$PROJECT_DIR$/kernel/src/test/scala/SupervisorSpec.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="17" column="65" selection-start="440" selection-end="476" vertical-scroll-proportion="0.0"> <state line="36" column="6" selection-start="852" selection-end="852" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteActorSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="27" column="6" selection-start="652" selection-end="652" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala"> <entry file="file://$PROJECT_DIR$/kernel/src/test/scala/RemoteSupervisorSpec.scala">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="12" column="26" selection-start="352" selection-end="352" vertical-scroll-proportion="0.0"> <state line="61" column="6" selection-start="1407" selection-end="1407" vertical-scroll-proportion="0.33114755">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/ActorSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="4" column="0" selection-start="86" selection-end="86" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/AllTests.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="16" column="75" selection-start="942" selection-end="942" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/PersistentActorSpec.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="66" column="6" selection-start="1817" selection-end="1817" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/RestTest.java">
<provider selected="true" editor-type-id="text-editor">
<state line="18" column="31" selection-start="548" selection-end="572" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/AllTests.java">
<provider selected="true" editor-type-id="text-editor">
<state line="23" column="196" selection-start="898" selection-end="898" vertical-scroll-proportion="0.0">
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/test/scala/EventBasedDispatcherTest.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="11" column="39" selection-start="396" selection-end="396" vertical-scroll-proportion="0.0">
<folding /> <folding />
</state> </state>
</provider> </provider>
@ -2836,37 +3112,9 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/Foo.java"> <entry file="file://$PROJECT_DIR$/config/akka.conf">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state line="14" column="9" selection-start="297" selection-end="297" vertical-scroll-proportion="0.0"> <state line="17" column="55" selection-start="599" selection-end="599" vertical-scroll-proportion="0.3767313">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/fun-test-java/src/test/java/se/scalablesolutions/akka/api/ActiveObjectGuiceConfiguratorTest.java">
<provider selected="true" editor-type-id="text-editor">
<state line="89" column="0" selection-start="3208" selection-end="3208" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/WEB-INF/classes/se/scalablesolutions/akka/kernel/actor/Actor.class">
<provider selected="true" editor-type-id="text-editor">
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/Actor.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="254" column="0" selection-start="9348" selection-end="9348" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kernel/src/main/scala/actor/ActiveObject.scala">
<provider selected="true" editor-type-id="text-editor">
<state line="255" column="18" selection-start="10360" selection-end="10360" vertical-scroll-proportion="0.51359224">
<folding /> <folding />
</state> </state>
</provider> </provider>

View file

@ -10,7 +10,7 @@ import java.util.concurrent.CopyOnWriteArraySet
import kernel.nio.{RemoteServer, RemoteClient, RemoteRequest} import kernel.nio.{RemoteServer, RemoteClient, RemoteRequest}
import kernel.reactor._ import kernel.reactor._
import kernel.config.ScalaConfig._ import kernel.config.ScalaConfig._
import kernel.stm.{TransactionAwareWrapperException, TransactionManagement} import kernel.stm.{TransactionRollbackException, TransactionAwareWrapperException, TransactionManagement}
import kernel.util.Helpers.ReadWriteLock import kernel.util.Helpers.ReadWriteLock
import kernel.util.Logging import kernel.util.Logging
import org.codehaus.aspectwerkz.proxy.Uuid import org.codehaus.aspectwerkz.proxy.Uuid
@ -35,17 +35,16 @@ class ActorMessageHandler(val actor: Actor) extends MessageHandler {
} }
object Actor { object Actor {
val timeout = kernel.Kernel.config.getInt("akka.actor.timeout", 5000) val TIMEOUT = kernel.Kernel.config.getInt("akka.actor.timeout", 5000)
} }
trait Actor extends Logging with TransactionManagement { trait Actor extends Logging with TransactionManagement {
@volatile private[this] var isRunning: Boolean = false @volatile private[this] var isRunning: Boolean = false
private[this] val remoteFlagLock = new ReadWriteLock private[this] val remoteFlagLock = new ReadWriteLock
private[this] val transactionalFlagLock = new ReadWriteLock private[this] val transactionalFlagLock = new ReadWriteLock
private var hotswap: Option[PartialFunction[Any, Unit]] = None private var hotswap: Option[PartialFunction[Any, Unit]] = None
private var config: Option[AnyRef] = None private var config: Option[AnyRef] = None
@volatile protected[this] var isTransactional = false @volatile protected[this] var isTransactional = false
@volatile protected[this] var remoteAddress: Option[InetSocketAddress] = None @volatile protected[this] var remoteAddress: Option[InetSocketAddress] = None
@volatile protected[kernel] var supervisor: Option[Actor] = None @volatile protected[kernel] var supervisor: Option[Actor] = None
@ -54,6 +53,9 @@ trait Actor extends Logging with TransactionManagement {
protected[this] val linkedActors = new CopyOnWriteArraySet[Actor] protected[this] val linkedActors = new CopyOnWriteArraySet[Actor]
protected[actor] var lifeCycleConfig: Option[LifeCycle] = None protected[actor] var lifeCycleConfig: Option[LifeCycle] = None
protected[this] var latestMessage: Option[MessageHandle] = None
protected[this] var messageToReschedule: Option[MessageHandle] = None
// ==================================== // ====================================
// ==== USER CALLBACKS TO OVERRIDE ==== // ==== USER CALLBACKS TO OVERRIDE ====
// ==================================== // ====================================
@ -63,7 +65,7 @@ trait Actor extends Logging with TransactionManagement {
* *
* Defines the default timeout for '!!' invocations, e.g. the timeout for the future returned by the call to '!!'. * Defines the default timeout for '!!' invocations, e.g. the timeout for the future returned by the call to '!!'.
*/ */
@volatile var timeout: Long = Actor.timeout @volatile var timeout: Long = Actor.TIMEOUT
/** /**
* User overridable callback/setting. * User overridable callback/setting.
@ -80,7 +82,7 @@ trait Actor extends Logging with TransactionManagement {
* <pre/> * <pre/>
* // default - executorService can be build up using the ThreadPoolBuilder * // default - executorService can be build up using the ThreadPoolBuilder
* new EventBasedThreadPoolDispatcher(executor: ExecutorService) * new EventBasedThreadPoolDispatcher(executor: ExecutorService)
* *
* new EventBasedSingleThreadDispatcher * new EventBasedSingleThreadDispatcher
* </pre> * </pre>
*/ */
@ -112,7 +114,7 @@ trait Actor extends Logging with TransactionManagement {
* Can be one of: * Can be one of:
* <pre/> * <pre/>
* AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Int) * AllForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Int)
* *
* OneForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Int) * OneForOneStrategy(maxNrOfRetries: Int, withinTimeRange: Int)
* </pre> * </pre>
*/ */
@ -196,15 +198,15 @@ trait Actor extends Logging with TransactionManagement {
isRunning = false isRunning = false
} else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it") } else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it")
} }
/** /**
* Sends a one-way asynchronous message. E.g. fire-and-forget semantics. * Sends a one-way asynchronous message. E.g. fire-and-forget semantics.
*/ */
def !(message: AnyRef): Unit = if (isRunning) { def !(message: AnyRef): Unit = if (isRunning) {
if (TransactionManagement.isTransactionalityEnabled) transactionalDispatch(message, timeout, false, true) if (TransactionManagement.isTransactionalityEnabled) transactionalDispatch(message, timeout, false, true)
else postMessageToMailbox(message) else postMessageToMailbox(message)
} else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it") } else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it")
/** /**
* Sends a message asynchronously and waits on a future for a reply message. * Sends a message asynchronously and waits on a future for a reply message.
* It waits on the reply either until it receives it (returns Some(replyMessage) or until the timeout expires (returns None). * It waits on the reply either until it receives it (returns Some(replyMessage) or until the timeout expires (returns None).
@ -236,7 +238,7 @@ trait Actor extends Logging with TransactionManagement {
def !![T](message: AnyRef): Option[T] = !![T](message, timeout) def !![T](message: AnyRef): Option[T] = !![T](message, timeout)
/** /**
* Sends a message asynchronously, but waits on a future indefinitely. E.g. emulates a synchronous call. * Sends a message asynchronously, but waits on a future indefinitely. E.g. emulates a synchronous call.
* E.g. send-and-receive-eventually semantics. * E.g. send-and-receive-eventually semantics.
*/ */
def !?[T](message: AnyRef): T = if (isRunning) { def !?[T](message: AnyRef): T = if (isRunning) {
@ -288,7 +290,7 @@ trait Actor extends Logging with TransactionManagement {
* Links an other actor to this actor. Links are unidirectional and means that a the linking actor will receive a notification nif the linked actor has crashed. * Links an other actor to this actor. Links are unidirectional and means that a the linking actor will receive a notification nif the linked actor has crashed.
* If the 'trapExit' flag has been set then it will 'trap' the failure and automatically restart the linked actors according to the restart strategy defined by the 'faultHandler'. * If the 'trapExit' flag has been set then it will 'trap' the failure and automatically restart the linked actors according to the restart strategy defined by the 'faultHandler'.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def link(actor: Actor) = { protected[this] def link(actor: Actor) = {
if (isRunning) { if (isRunning) {
@ -300,9 +302,9 @@ trait Actor extends Logging with TransactionManagement {
} }
/** /**
* Unlink the actor. * Unlink the actor.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def unlink(actor: Actor) = { protected[this] def unlink(actor: Actor) = {
if (isRunning) { if (isRunning) {
@ -312,11 +314,11 @@ trait Actor extends Logging with TransactionManagement {
log.debug("Unlinking actor [%s] from actor [%s]", actor, this) log.debug("Unlinking actor [%s] from actor [%s]", actor, this)
} else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it") } else throw new IllegalStateException("Actor has not been started, you need to invoke 'actor.start' before using it")
} }
/** /**
* Atomically start and link an actor. * Atomically start and link an actor.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def startLink(actor: Actor) = { protected[this] def startLink(actor: Actor) = {
actor.start actor.start
@ -326,7 +328,7 @@ trait Actor extends Logging with TransactionManagement {
/** /**
* Atomically start, link and make an actor remote. * Atomically start, link and make an actor remote.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def startLinkRemote(actor: Actor) = { protected[this] def startLinkRemote(actor: Actor) = {
actor.makeRemote(RemoteServer.HOSTNAME, RemoteServer.PORT) actor.makeRemote(RemoteServer.HOSTNAME, RemoteServer.PORT)
@ -337,10 +339,10 @@ trait Actor extends Logging with TransactionManagement {
/** /**
* Atomically create (from actor class) and start an actor. * Atomically create (from actor class) and start an actor.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def spawn(actorClass: Class[_]): Actor = { protected[this] def spawn(actorClass: Class[_]): Actor = {
val actor = actorClass.newInstance.asInstanceOf[Actor] val actor = actorClass.newInstance.asInstanceOf[Actor]
actor.dispatcher = dispatcher actor.dispatcher = dispatcher
actor.mailbox = mailbox actor.mailbox = mailbox
actor.start actor.start
@ -350,10 +352,10 @@ trait Actor extends Logging with TransactionManagement {
/** /**
* Atomically create (from actor class), start and make an actor remote. * Atomically create (from actor class), start and make an actor remote.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def spawnRemote(actorClass: Class[_]): Actor = { protected[this] def spawnRemote(actorClass: Class[_]): Actor = {
val actor = actorClass.newInstance.asInstanceOf[Actor] val actor = actorClass.newInstance.asInstanceOf[Actor]
actor.makeRemote(RemoteServer.HOSTNAME, RemoteServer.PORT) actor.makeRemote(RemoteServer.HOSTNAME, RemoteServer.PORT)
actor.dispatcher = dispatcher actor.dispatcher = dispatcher
actor.mailbox = mailbox actor.mailbox = mailbox
@ -364,7 +366,7 @@ trait Actor extends Logging with TransactionManagement {
/** /**
* Atomically create (from actor class), start and link an actor. * Atomically create (from actor class), start and link an actor.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def spawnLink(actorClass: Class[_]): Actor = { protected[this] def spawnLink(actorClass: Class[_]): Actor = {
val actor = spawn(actorClass) val actor = spawn(actorClass)
@ -375,7 +377,7 @@ trait Actor extends Logging with TransactionManagement {
/** /**
* Atomically create (from actor class), start, link and make an actor remote. * Atomically create (from actor class), start, link and make an actor remote.
* <p/> * <p/>
* To be invoked from within the actor itself. * To be invoked from within the actor itself.
*/ */
protected[this] def spawnLinkRemote(actorClass: Class[_]): Actor = { protected[this] def spawnLinkRemote(actorClass: Class[_]): Actor = {
val actor = spawn(actorClass) val actor = spawn(actorClass)
@ -392,7 +394,11 @@ trait Actor extends Logging with TransactionManagement {
if (remoteAddress.isDefined) { if (remoteAddress.isDefined) {
val supervisorUuid = registerSupervisorAsRemoteActor val supervisorUuid = registerSupervisorAsRemoteActor
RemoteClient.clientFor(remoteAddress.get).send(new RemoteRequest(true, message, null, this.getClass.getName, timeout, null, true, false, supervisorUuid)) RemoteClient.clientFor(remoteAddress.get).send(new RemoteRequest(true, message, null, this.getClass.getName, timeout, null, true, false, supervisorUuid))
} else mailbox.append(new MessageHandle(this, message, None, activeTx)) } else {
val handle = new MessageHandle(this, message, None, activeTx)
mailbox.append(handle)
latestMessage = Some(handle)
}
} }
private def postMessageToMailboxAndCreateFutureResultWithTimeout(message: AnyRef, timeout: Long): CompletableFutureResult = remoteFlagLock.withReadLock { // the price you pay for being able to make an actor remote at runtime private def postMessageToMailboxAndCreateFutureResultWithTimeout(message: AnyRef, timeout: Long): CompletableFutureResult = remoteFlagLock.withReadLock { // the price you pay for being able to make an actor remote at runtime
@ -403,13 +409,31 @@ trait Actor extends Logging with TransactionManagement {
else throw new IllegalStateException("Expected a future from remote call to actor " + toString) else throw new IllegalStateException("Expected a future from remote call to actor " + toString)
} else { } else {
val future = new DefaultCompletableFutureResult(timeout) val future = new DefaultCompletableFutureResult(timeout)
mailbox.append(new MessageHandle(this, message, Some(future), TransactionManagement.threadBoundTx.get)) val handle = new MessageHandle(this, message, Some(future), TransactionManagement.threadBoundTx.get)
mailbox.append(handle)
latestMessage = Some(handle)
future future
} }
} }
private def transactionalDispatch[T](message: AnyRef, timeout: Long, blocking: Boolean, oneWay: Boolean): Option[T] = { private def transactionalDispatch[T](message: AnyRef, timeout: Long, blocking: Boolean, oneWay: Boolean): Option[T] = {
tryToCommitTransaction import TransactionManagement._
if (!tryToCommitTransaction) {
var nrRetries = 0 // FIXME only if top-level
var failed = true
do {
Thread.sleep(TIME_WAITING_FOR_COMPLETION)
nrRetries += 1
log.debug("Pending transaction [%s] not completed, waiting %s milliseconds. Attempt %s", activeTx.get, TIME_WAITING_FOR_COMPLETION, nrRetries)
failed = !tryToCommitTransaction
} while(nrRetries < NR_OF_TIMES_WAITING_FOR_COMPLETION && failed)
if (failed) {
log.debug("Pending transaction [%s] still not completed, aborting and rescheduling message [%s]", activeTx.get, latestMessage)
rollback(activeTx)
if (RESTART_TRANSACTION_ON_COLLISION) messageToReschedule = Some(latestMessage.get)
else throw new TransactionRollbackException("Conflicting transactions, rolling back transaction for message [" + latestMessage + "]")
}
}
if (isInExistingTransaction) joinExistingTransaction if (isInExistingTransaction) joinExistingTransaction
else if (isTransactional) startNewTransaction else if (isTransactional) startNewTransaction
incrementTransaction incrementTransaction
@ -433,6 +457,13 @@ trait Actor extends Logging with TransactionManagement {
if (isTransactionAborted) removeTransactionIfTopLevel if (isTransactionAborted) removeTransactionIfTopLevel
else tryToPrecommitTransaction else tryToPrecommitTransaction
TransactionManagement.threadBoundTx.set(None) TransactionManagement.threadBoundTx.set(None)
if (messageToReschedule.isDefined) {
val handle = messageToReschedule.get
val newTx = startNewTransaction
val clone = new MessageHandle(handle.sender, handle.message, handle.future, newTx)
log.debug("Rescheduling message %s", clone)
mailbox.append(clone) // FIXME append or prepend rescheduled messages?
}
} }
} }
@ -481,7 +512,7 @@ trait Actor extends Logging with TransactionManagement {
if (trapExit) { if (trapExit) {
if (faultHandler.isDefined) { if (faultHandler.isDefined) {
faultHandler.get match { faultHandler.get match {
// FIXME: implement support for maxNrOfRetries and withinTimeRange in RestartStrategy // FIXME: implement support for maxNrOfRetries and withinTimeRange in RestartStrategy
case AllForOneStrategy(maxNrOfRetries, withinTimeRange) => restartLinkedActors(reason) case AllForOneStrategy(maxNrOfRetries, withinTimeRange) => restartLinkedActors(reason)
case OneForOneStrategy(maxNrOfRetries, withinTimeRange) => dead.restart(reason) case OneForOneStrategy(maxNrOfRetries, withinTimeRange) => dead.restart(reason)
} }

View file

@ -57,6 +57,8 @@ class MessageHandle(val sender: AnyRef,
that.asInstanceOf[MessageHandle].future.get == future.get && that.asInstanceOf[MessageHandle].future.get == future.get &&
that.asInstanceOf[MessageHandle].tx.isDefined == tx.isDefined && that.asInstanceOf[MessageHandle].tx.isDefined == tx.isDefined &&
that.asInstanceOf[MessageHandle].tx.get.id == tx.get.id that.asInstanceOf[MessageHandle].tx.get.id == tx.get.id
override def toString(): String = "MessageHandle[message = " + message + ", sender = " + sender + ", future = " + future + ", tx = " + tx + "]"
} }
class MessageQueue { class MessageQueue {

View file

@ -8,7 +8,7 @@ import java.util.concurrent.atomic.{AtomicInteger, AtomicLong}
import kernel.state.Transactional import kernel.state.Transactional
import kernel.util.Logging import kernel.util.Logging
import scala.collection.mutable.{HashSet, HashMap} class TransactionRollbackException(msg: String) extends RuntimeException(msg)
@serializable sealed abstract class TransactionStatus @serializable sealed abstract class TransactionStatus
object TransactionStatus { object TransactionStatus {
@ -72,7 +72,7 @@ object TransactionIdFactory {
} }
} }
def commit(participant: String) = synchronized { def commit(participant: String): Boolean = synchronized {
if (status == TransactionStatus.Active) { if (status == TransactionStatus.Active) {
log.debug("TX COMMIT - Committing transaction [%s] for server with UUID [%s]", toString, participant) log.debug("TX COMMIT - Committing transaction [%s] for server with UUID [%s]", toString, participant)
val haveAllPreCommitted = val haveAllPreCommitted =
@ -85,9 +85,13 @@ object TransactionIdFactory {
if (haveAllPreCommitted) { if (haveAllPreCommitted) {
transactionals.items.foreach(_.commit) transactionals.items.foreach(_.commit)
status = TransactionStatus.Completed status = TransactionStatus.Completed
} else rollback(participant) reset
true
} else false
} else {
reset
true
} }
reset
} }
def rollback(participant: String) = synchronized { def rollback(participant: String) = synchronized {
@ -98,6 +102,13 @@ object TransactionIdFactory {
reset reset
} }
def rollbackForRescheduling(participant: String) = synchronized {
ensureIsActiveOrAborted
log.debug("TX ROLLBACK for recheduling - Server with UUID [%s] has initiated transaction rollback for [%s]", participant, toString)
transactionals.items.foreach(_.rollback)
reset
}
def join(participant: String) = synchronized { def join(participant: String) = synchronized {
ensureIsActive ensureIsActive
log.debug("TX JOIN - Server with UUID [%s] is joining transaction [%s]" , participant, toString) log.debug("TX JOIN - Server with UUID [%s] is joining transaction [%s]" , participant, toString)

View file

@ -14,10 +14,13 @@ class TransactionAwareWrapperException(val cause: Throwable, val tx: Option[Tran
} }
object TransactionManagement { object TransactionManagement {
private val txEnabled = new AtomicBoolean(kernel.Kernel.config.getBool("akka.stm.service", true)) val TIME_WAITING_FOR_COMPLETION = kernel.Kernel.config.getInt("akka.stm.wait-for-completion", 100)
val NR_OF_TIMES_WAITING_FOR_COMPLETION = kernel.Kernel.config.getInt("akka.stm.wait-nr-of-times", 3)
val TRANSACTION_ENABLED = new AtomicBoolean(kernel.Kernel.config.getBool("akka.stm.service", true))
val RESTART_TRANSACTION_ON_COLLISION = kernel.Kernel.config.getBool("akka.stm.restart-transaction", true)
def isTransactionalityEnabled = txEnabled.get def isTransactionalityEnabled = TRANSACTION_ENABLED.get
def disableTransactions = txEnabled.set(false) def disableTransactions = TRANSACTION_ENABLED.set(false)
private[kernel] val threadBoundTx: ThreadLocal[Option[Transaction]] = new ThreadLocal[Option[Transaction]]() { private[kernel] val threadBoundTx: ThreadLocal[Option[Transaction]] = new ThreadLocal[Option[Transaction]]() {
override protected def initialValue: Option[Transaction] = None override protected def initialValue: Option[Transaction] = None
@ -31,12 +34,13 @@ trait TransactionManagement extends Logging {
import TransactionManagement.threadBoundTx import TransactionManagement.threadBoundTx
private[kernel] var activeTx: Option[Transaction] = None private[kernel] var activeTx: Option[Transaction] = None
protected def startNewTransaction = { protected def startNewTransaction: Option[Transaction] = {
val newTx = new Transaction val newTx = new Transaction
newTx.begin(uuid) newTx.begin(uuid)
val tx = Some(newTx) val tx = Some(newTx)
activeTx = tx activeTx = tx
threadBoundTx.set(tx) threadBoundTx.set(tx)
tx
} }
protected def joinExistingTransaction = { protected def joinExistingTransaction = {
@ -52,10 +56,11 @@ trait TransactionManagement extends Logging {
protected def tryToCommitTransaction: Boolean = if (activeTx.isDefined) { protected def tryToCommitTransaction: Boolean = if (activeTx.isDefined) {
val tx = activeTx.get val tx = activeTx.get
tx.commit(uuid) if (tx.commit(uuid)) {
removeTransactionIfTopLevel removeTransactionIfTopLevel
true true
} else false } else false
} else true
protected def rollback(tx: Option[Transaction]) = tx match { protected def rollback(tx: Option[Transaction]) = tx match {
case None => {} // no tx; nothing to do case None => {} // no tx; nothing to do
@ -63,14 +68,13 @@ trait TransactionManagement extends Logging {
tx.rollback(uuid) tx.rollback(uuid)
} }
protected def isInExistingTransaction = protected def rollbackForRescheduling(tx: Option[Transaction]) = tx match {
// FIXME should not need to have this runtime "fix" - investigate what is causing this to happen case None => {} // no tx; nothing to do
// if (TransactionManagement.threadBoundTx.get == null) { case Some(tx) =>
// TransactionManagement.threadBoundTx.set(None) tx.rollbackForRescheduling(uuid)
// false }
// } else {
TransactionManagement.threadBoundTx.get.isDefined protected def isInExistingTransaction = TransactionManagement.threadBoundTx.get.isDefined
// }
protected def isTransactionAborted = activeTx.isDefined && activeTx.get.isAborted protected def isTransactionAborted = activeTx.isDefined && activeTx.get.isAborted

View file

@ -0,0 +1,95 @@
package se.scalablesolutions.akka.kernel.actor
import junit.framework.TestCase
import kernel.stm.TransactionRollbackException
import org.junit.{Test, Before}
import org.junit.Assert._
import kernel.state.TransactionalState
object Log {
var log = ""
}
class TxActor(clasher: Actor) extends Actor {
timeout = 1000000
makeTransactional
def receive: PartialFunction[Any, Unit] = {
case msg: AnyRef =>
clasher !! msg
reply(msg)
}
}
class TxClasherActor extends Actor {
val vector = TransactionalState.newInMemoryVector[String]
timeout = 1000000
makeTransactional
var count = 0
def receive: PartialFunction[Any, Unit] = {
case "First" =>
if (count == 0) Thread.sleep(5000)
count += 1
println("FIRST")
vector.add("First")
println("--- VECTOR: " + vector)
reply("First")
case "Second" =>
println("SECOND")
vector.add("Second")
println("--- VECTOR: " + vector)
reply("Second")
case "Index0" =>
reply(vector(0))
case "Index1" =>
reply(vector(1))
}
}
class TransactionClasherSpec extends TestCase {
@Test
def testX = {
val clasher = new TxClasherActor
clasher.start
val txActor1 = new TxActor(clasher)
txActor1.start
val txActor2 = new TxActor(clasher)
txActor2.start
val t1 = new Thread(new Runnable() {
def run = {
txActor1 !! "First"
}
}).start
Thread.sleep(1000)
try {
txActor2 !! "Second"
fail("Expected TransactionRollbackException")
} catch { case e: TransactionRollbackException => {} }
}
/*
@Test
def testX = {
val clasher = new TxClasherActor
clasher.start
val txActor1 = new TxActor(clasher)
txActor1.start
val txActor2 = new TxActor(clasher)
txActor2.start
val t1 = new Thread(new Runnable() {
def run = {
txActor1 !! "First"
}
}).start
Thread.sleep(1000)
val res2 = txActor2 !! "Second"
Thread.sleep(10000)
assertEquals("Second", (clasher !! "Index0").get)
assertEquals("First", (clasher !! "Index1").get)
}
*/
}