|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2017 the original author or authors. |
| 2 | + * Copyright 2002-2021 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
19 | 19 | import org.springframework.transaction.support.TransactionSynchronization;
|
20 | 20 |
|
21 | 21 | /**
|
22 |
| - * The phase at which a transactional event listener applies. |
| 22 | + * The phase in which a transactional event listener applies. |
23 | 23 | *
|
24 | 24 | * @author Stephane Nicoll
|
25 | 25 | * @author Juergen Hoeller
|
| 26 | + * @author Sam Brannen |
26 | 27 | * @since 4.2
|
27 | 28 | * @see TransactionalEventListener
|
28 | 29 | */
|
29 | 30 | public enum TransactionPhase {
|
30 | 31 |
|
31 | 32 | /**
|
32 |
| - * Fire the event before transaction commit. |
| 33 | + * Handle the event before transaction commit. |
33 | 34 | * @see TransactionSynchronization#beforeCommit(boolean)
|
34 | 35 | */
|
35 | 36 | BEFORE_COMMIT,
|
36 | 37 |
|
37 | 38 | /**
|
38 |
| - * Fire the event after the commit has completed successfully. |
39 |
| - * <p>Note: This is a specialization of {@link #AFTER_COMPLETION} and |
40 |
| - * therefore executes in the same after-completion sequence of events, |
| 39 | + * Handle the event after the commit has completed successfully. |
| 40 | + * <p>Note: This is a specialization of {@link #AFTER_COMPLETION} and therefore |
| 41 | + * executes in the same sequence of events as {@code AFTER_COMPLETION} |
41 | 42 | * (and not in {@link TransactionSynchronization#afterCommit()}).
|
| 43 | + * <p>Interactions with the underlying transactional resource will not be |
| 44 | + * committed in this phase. See |
| 45 | + * {@link TransactionSynchronization#afterCompletion(int)} for details. |
42 | 46 | * @see TransactionSynchronization#afterCompletion(int)
|
43 | 47 | * @see TransactionSynchronization#STATUS_COMMITTED
|
44 | 48 | */
|
45 | 49 | AFTER_COMMIT,
|
46 | 50 |
|
47 | 51 | /**
|
48 |
| - * Fire the event if the transaction has rolled back. |
49 |
| - * <p>Note: This is a specialization of {@link #AFTER_COMPLETION} and |
50 |
| - * therefore executes in the same after-completion sequence of events. |
| 52 | + * Handle the event if the transaction has rolled back. |
| 53 | + * <p>Note: This is a specialization of {@link #AFTER_COMPLETION} and therefore |
| 54 | + * executes in the same sequence of events as {@code AFTER_COMPLETION}. |
| 55 | + * <p>Interactions with the underlying transactional resource will not be |
| 56 | + * committed in this phase. See |
| 57 | + * {@link TransactionSynchronization#afterCompletion(int)} for details. |
51 | 58 | * @see TransactionSynchronization#afterCompletion(int)
|
52 | 59 | * @see TransactionSynchronization#STATUS_ROLLED_BACK
|
53 | 60 | */
|
54 | 61 | AFTER_ROLLBACK,
|
55 | 62 |
|
56 | 63 | /**
|
57 |
| - * Fire the event after the transaction has completed. |
| 64 | + * Handle the event after the transaction has completed. |
58 | 65 | * <p>For more fine-grained events, use {@link #AFTER_COMMIT} or
|
59 | 66 | * {@link #AFTER_ROLLBACK} to intercept transaction commit
|
60 | 67 | * or rollback, respectively.
|
| 68 | + * <p>Interactions with the underlying transactional resource will not be |
| 69 | + * committed in this phase. See |
| 70 | + * {@link TransactionSynchronization#afterCompletion(int)} for details. |
61 | 71 | * @see TransactionSynchronization#afterCompletion(int)
|
62 | 72 | */
|
63 | 73 | AFTER_COMPLETION
|
|
0 commit comments