blob: a8e83973fb1ce7885026b4b5370777e81245600c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import sub.ExecutionMonitor;
import sub.ObserverProtocol;
public class TransactionTest {
public static void main(String[] args) {
}
static Transaction theTransaction;
private void assertCommitted() {
theTransaction.getCount("method-execution", "commit");
}
static aspect MonitorTest {
declare parents: Transaction implements ExecutionMonitor.MonitoredItem;
}
}
class Transaction {
}
aspect TransactionControl {
void begin() {
CommitObserver.aspectOf().add(this);
}
static aspect CommitObserver extends ObserverProtocol {
declare parents: TransactionControl implements Observer;
}
}
|