Consistent support for @Order annotation as alternative to Ordered interface

Issue: SPR-12806
This commit is contained in:
Juergen Hoeller
2015-03-13 18:18:33 +01:00
parent f5b4e18209
commit 13659d645b
12 changed files with 141 additions and 115 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.NamedThreadLocal;
import org.springframework.core.OrderComparator;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.util.Assert;
/**
@@ -314,7 +314,7 @@ public abstract class TransactionSynchronizationManager {
else {
// Sort lazily here, not in registerSynchronization.
List<TransactionSynchronization> sortedSynchs = new ArrayList<TransactionSynchronization>(synchs);
OrderComparator.sort(sortedSynchs);
AnnotationAwareOrderComparator.sort(sortedSynchs);
return Collections.unmodifiableList(sortedSynchs);
}
}