Java API Interception for Preemptive Resource Fault Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for detecting memory over-allocation in Java applications are inadequate as they fail to proactively identify the responsible thread or function, do not provide mechanisms to stop execution, and lack a generic approach for monitoring all resource types, leading to potential system crashes.
Innovation Solution
A method and system that intercept API calls through extended method classes, check resource usage against predetermined thresholds, and use a context selector to identify faulty conditions, allowing for proactive detection and prevention of memory over-allocation, file exhaustion, and connection overruns by determining the responsible function or thread and taking corrective actions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If garbage collection is used to prevent memory over-allocation, then memory management is automated, but the system cannot identify responsible threads or stop runaway functions
Solution Approach 1:
The patent introduces an intermediary monitoring system that intercepts API calls between threads and memory resources. This mediator tracks resource usage patterns, identifies responsible threads through call stacking, and enables selective intervention without replacing the garbage collection mechanism entirely.
Solution Approach 2:
The system implements feedback loops where resource usage is continuously monitored, analyzed, and fed back to identify anomalies. When memory allocation patterns deviate from expected behavior, the system generates alerts and can trigger corrective actions targeting specific threads based on the feedback from monitoring data.
2Quantity of substance
If memory size is increased to handle over-allocation, then available memory increases, but developers must manually modify applications and no mechanism exists for detecting file exhaustion or connection overruns
Solution Approach 1:
The patent creates a universal monitoring framework that handles multiple resource types (memory, files, connections) through a single system. The same API interception and threshold monitoring mechanism applies across different resource categories, eliminating the need for separate detection mechanisms for each resource type.
Solution Approach 2:
Instead of changing the quantity of resources (increasing memory size), the system changes the monitoring parameters by setting threshold limits for resource usage. When usage parameters exceed predefined thresholds, the system triggers alerts or corrective actions, providing proactive management without requiring resource expansion.
3Reliability
If proactive detection is implemented to prevent system crashes, then system reliability improves, but the system must monitor and analyze resource usage in real-time
Solution Approach 1:
The system applies partial monitoring by focusing only on critical resource allocation points through API interception rather than monitoring all system activities. Threshold-based triggering means full analysis is performed only when necessary, reducing continuous overhead while maintaining proactive detection capabilities.
Data Source
AI summary
A method and a system have been disclosed for the preemptive detection of occurrence of one or more faulty conditions based on the usage of one or more resources. The faulty conditions are detected during an execution of a program; the program includes at least one function. The method includes initializing Application Program Interfaces (APIs) across the at least one function. After this, calls to the APIs used within a namespace of the program are intercepted. The interception is performed by the at least one function through extended method classes. Thereafter, the usage of the resources for the at least function intercepting the APIs is checked against a corresponding predetermined threshold limit. Once the usage of the resources is checked, context of the usage of the resources is identified based on a predefined knowledge. Subsequently, the occurrence of the faulty conditions is determined based on the identification.


