javax.activity


1. Creating and Using a Transaction Manager

import javax.activity.TransactionManager;

try {
    TransactionManager tm = TransactionManagerFactory.getTransactionManager();
    tm.begin();
    // Perform transactional operations
    tm.commit();
} catch (Exception e) {
    tm.rollback();
}

2. Implementing the javax.transaction.Synchronization Interface

import javax.activity.Synchronization;

public class MySynchronization implements Synchronization {

    @Override
    public void beforeCompletion() {
        // Perform any necessary actions before transaction completes
    }

    @Override
    public void afterCompletion(int status) {
        // Perform any necessary actions after transaction completes, status indicates success/failure
    }
}

3. Registering a Resource Manager

4. Registering a Transactional Callback

5. Using a Transaction Synchronization Context

6. Suspending and Resuming a Transaction

7. Committing, Rolling Back, and Marking Transactions Rolled Back

8. Using the TransactionFactory

9. Creating a Transaction Descriptor

10. Creating a JTS Connector Architecture (JCA) Resource Adapter

11. Using the TransactionManagerFactory

12. Using the TransactionSynchronizationManager

13. Using the TransactionSynchronization Registry

14. Using the TransactionTimeoutManager

15. Using the TransactionId

16. Using the TransactionState

17. Using the TransactionType

18. Using the Xid

19. Using the XAResource

20. Using the XADescriptor

21. Using the XAResourceManager

22. Using the TransactionManager

23. Using the TransactionFactory

24. Using the XAResourceFactory

25. Using the XAClass

26. Using the XAException

27. Using the XAResource

28. Using the XAException

29. Using the Xid

30. Using the XAState

31. Using the Transaction

32. Using the TransactionType

33. Using the TransactionIsolation

34. Using the TransactionTimeout

35. Using the TransactionTimeoutManager

36. Using the TransactionSynchronization

37. Using the TransactionSynchronizationRegistry

38. Using the TransactionFactory

39. Using the XAResourceFactory

40. Using the Transaction

41. Using the TransactionManager

42. Using the TransactionFactory

43. Using the XAException

44. Using the XAResource

45. Using the XADescriptor

46. Using the XAResourceManager

47. Using the Transaction

48. Using the TransactionManager

49. Using the TransactionFactory

50. Using the XAException