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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user