Transaction Manager Thread for Timeout Cancellation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Java Transactional Architecture (JTA) transactions that time out or become long-running can lead to locked or unfinished states, causing resource exhaustion and database inconsistency issues.

Innovation Solution

A transaction manager system is implemented within an application server to identify and cancel locked or long-running transactions using a new thread, ensuring synchronization-free monitoring and maintaining data consistency by registering with a timeout manager and exposing APIs for resource adapters to manage these transactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a JTA transaction is flagged as a candidate for rollback, then database consistency is preserved, but the transaction remains in a locked or long-running state causing resource exhaustion

Engineering Contradiction:
Improvedatabase consistencyVSAvoidresource exhaustion
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary actions by creating a dedicated monitoring thread that continuously checks transaction status before resource exhaustion occurs. This thread proactively identifies locked or long-running transactions and triggers rollback procedures in advance, preventing resource exhaustion while maintaining database consistency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A dedicated monitoring thread acts as an intermediary between the transaction management system and the resource management system. This intermediary thread continuously monitors transaction states, identifies problematic transactions, and coordinates rollback operations, thereby resolving the contradiction between maintaining consistency and preventing resource exhaustion.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Loss of time

If a transaction is monitored continuously to detect timeouts, then timely cancellation is achieved, but asynchronous monitoring introduces performance overhead

Engineering Contradiction:
Improvetimeout detection speedVSAvoidperformance overhead
Core Design Contradiction:
Loss of timeVSUse of energy by moving object

Solution Approach 1:

The monitoring thread performs self-service by independently checking transaction status without requiring continuous intervention from the main transaction processing thread. This self-contained monitoring mechanism achieves timely timeout detection while minimizing performance overhead by operating autonomously within the existing transaction framework.

Inventive Principle:
Principle #25Self-service

3Stability of the object's composition

If a new thread is created to monitor and cancel transactions, then synchronized monitoring is achieved, but thread creation adds system complexity

Engineering Contradiction:
ImprovesynchronizationVSAvoidthread management
Core Design Contradiction:
Stability of the object's compositionVSDevice complexity

Solution Approach 1:

The monitoring thread is designed with multi-functionality, serving multiple purposes: it monitors transaction status, detects timeouts, identifies locked transactions, and coordinates rollback operations. This universal approach achieves synchronized monitoring while reducing overall system complexity by consolidating multiple functions into a single thread rather than requiring separate mechanisms for each function.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS9027026B2Managing transactions within an application server
Publication Date: 2015.05.05 SAP SE
  • US9027026B2 patent drawing
  • US9027026B2 patent drawing
  • US9027026B2 patent drawing

AI summary

A system and method for managing transactions in an application server is described. In some example embodiments, the system registers to receive notifications from a timeout manager associated with a transaction (e.g., a database query). If the transaction becomes locked or runs longer than anticipated, the system receives a notification indicating a timeout event. The system, upon receiving the event notification, may then cancel the transaction or perform other actions to notify an application that initiated the transaction, such as via a newly created thread.