You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

TransactionTest.java 660B

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