Annotated Clustered Method Execution for Singleton EJB Integrity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In clustered application server environments, executing the same code with the same parameters across all nodes simultaneously is challenging, particularly for stateful or Singleton Java beans, which can result in multiple instances and render them unusable.
Innovation Solution
A method is provided to identify annotated classes in an application, create instances of these classes, and coordinate the execution of clustered methods across nodes, ensuring that the methods are executed consistently and synchronously across the cluster.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the same code is executed on all application servers in the cluster simultaneously, then workload management and failover are provided, but stateful or Singleton Java beans cannot maintain their intended single-instance state
Solution Approach 1:
The system performs preliminary identification of clustered methods through annotations before execution. The annotation processing occurs during application deployment, allowing the system to pre-determine which methods should be executed on all nodes simultaneously while maintaining awareness of the Singleton EJB state requirements, thus preventing state corruption before it can occur
Solution Approach 2:
The patent introduces an intermediary mechanism in the form of annotated classes that act as mediators between the clustered method execution requirement and the Singleton EJB state maintenance. The annotation serves as an intermediary marker that allows the system to identify and handle clustered methods specially, ensuring they execute across all nodes without compromising the single-instance state of Singleton EJBs
2Ease of operation
If Singleton EJB is used to ensure single exit from the application, then application control is maintained, but in a clustered environment multiple instances are created making the Singleton EJB unusable
Solution Approach 1:
The patent segments the application behavior into two distinct parts: clustered methods that are annotated and executed on all nodes, and Singleton EJB instances that maintain their single-instance nature. This segmentation allows the system to execute code across multiple nodes while preserving the single-instance state of Singleton EJBs by clearly separating concerns through annotation-based identification
Solution Approach 2:
The system applies local quality by treating annotated classes differently from regular classes. The annotation creates a local property that identifies which methods should be executed in a clustered manner, allowing the Singleton EJB to maintain its single-instance quality in specific locations (the EJB container) while other parts of the system (clustered methods) execute across multiple nodes
3Adaptability or versatility
If clustered methods are executed at each node independently, then node autonomy is maintained, but consistent execution across the cluster becomes difficult
Solution Approach 1:
The patent uses parameter changes in the form of annotations to modify the execution behavior of methods. The annotation parameter indicates that a method should be executed in a clustered manner, which changes how the method is handled across nodes. This allows the system to maintain node autonomy while achieving execution consistency through the standardized annotation parameter that all nodes recognize and process uniformly
Data Source
AI summary
Systems and methods are disclosed for executing a clustered method at a cluster of nodes. An example method includes identifying an annotated class included in an application that is deployed on the cluster of nodes. An annotation of the class indicates that a clustered method associated with the annotated class is executed at each node in the cluster. The method also includes creating an instance of the annotated class and coordinating execution of the clustered method with one or more other nodes in the cluster. The method further includes executing, based on the coordinating, the clustered method using the respective node's instance of the annotated class.


