Mutable Key Mechanism for Persistent Object Method Invocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing Enterprise JavaBeans and similar persistent objects are limited by immutable primary keys, which cannot adapt to changing user identification information across multiple media servers, such as email and audio-conferencing servers, leading to incomplete and outdated data reflections.
Innovation Solution
Implementing a mechanism that allows for method invocation with mutable keys for persistent objects, enabling dynamic updates of primary keys such as email addresses and phone numbers, and providing finder methods to retrieve and update user instances based on these keys.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If primary keys are made immutable as per EJB specification, then data consistency and reliability are improved, but adaptability to changing user identification information deteriorates
Solution Approach 1:
The primary key is segmented into two parts: an immutable internal key (generated by the system) and a mutable external key (user-provided identification like email or phone number). The immutable internal key maintains data consistency for database operations, while the mutable external key provides adaptability to changing user identification information. This segmentation resolves the contradiction by allowing both immutability and mutability in different contexts.
Solution Approach 2:
An intermediary mapping table is introduced between the immutable internal primary key and the mutable external key. This intermediary layer allows the system to maintain the EJB specification's requirement for immutable primary keys while enabling flexible updates to user identification information through the mapping relationship. The intermediary absorbs the conflict between immutability and adaptability.
2Loss of information
If comprehensive user log-in information is required initially, then data completeness is improved, but ease of operation deteriorates
Solution Approach 1:
The system performs preliminary action by generating an immutable internal primary key during user registration, even before complete user identification information is provided. This allows the user account to be created with partial information, and the internal key serves as a placeholder that maintains data completeness for system operations while allowing flexible addition of external identification details later.
Solution Approach 2:
The system implements dynamics by allowing the external key (user identification) to be mutable and updatable after initial registration. Users can add or change their email addresses, phone numbers, or other identification information without requiring comprehensive information upfront. The system dynamically adapts as users provide more information over time, improving ease of operation while maintaining data completeness through the immutable internal key.
Data Source
AI summary
A mechanism is disclosed that enables the invocation of methods of object instances that have persistent data and a mutable key. A mutable key capability is advantageous in a variety of applications, such as monitoring a set of users and their login status on a plurality of media servers (e.g., an email server, an instant messaging server, a voice mail server, a video server, an audio-conferencing server, etc.). The methods that can be invoked include get methods, set methods, unset methods, finder methods, destructors, and business methods. Implementations based on the Enterprise JavaBean specification are disclosed for three illustrative embodiments of the present invention. The illustrative embodiments of the present invention can also be implemented in accordance with object persistence mechanisms other than Enterprise JavaBeans.


