Implement hooks for transaction state changes