We surely want to not run a transition if we try to note it and discover that

another process has noted it first.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2367 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2008-08-20 16:45:52 +00:00
parent 7081b141b1
commit 85da2e609c
@@ -65,8 +65,7 @@ public class TransitionRepository extends SimpleRepository
public void transition (Class<?> clazz, String name, Transition trans)
throws PersistenceException
{
if (!isTransitionApplied(clazz, name)) {
noteTransition(clazz, name);
if (!isTransitionApplied(clazz, name) && noteTransition(clazz, name)) {
try {
trans.run();
@@ -92,7 +91,7 @@ public class TransitionRepository extends SimpleRepository
}
/**
* Has the specified name transition been applied.
* Returns whether the specified name transition been applied.
*/
public boolean isTransitionApplied (Class<?> clazz, final String name)
throws PersistenceException