Browse Prior Art Database

Method and System to support multiple Caching Solutions in Java/J2EE applications based of a Consumer Model of the application Disclosure Number: IPCOM000181995D
Original Publication Date: 2009-Apr-22
Included in the Prior Art Database: 2009-Apr-22

Publishing Venue



In today's IT ecosystems there are various flavors of Caching Mechanisms utilized by Java/J2EE applications. Sometimes a single Caching Solution is utilized to satisfy all the needs of an applications and sometimes mutliple Caching Solutions are utilized to satisfy the needs of an application. The latter is the area of the solution being looked upon. The usage of mutliple Caching Solutions, their issues and why the resolutions needed are as follows - Java/J2EE applications in some scenarios would want to consume multiple Caching Solutions (for e.g. Apache JCS and ObjectGrid or ObjectGrid and In-Memory Database) where-in the behavioral aspects are defined by a Consumer Model as per the Consuming application's requirements and behavioral attributes of the Caching Solutions need to comply to this Consumer Model In the event of a Java/J2EE application consuming multiple Caching Solutions, there is a need to maintain Coherence across Caching Solutions given a scenario where-in one instance of the Application using X Caching Solution and another instance of the Application using Y Caching Solution ( X & Y being Caching solutions/or Systems being used as Caching solutions from different vendors) In the event of a Java/J2EE application consuming multiple Caching Solutions, faces a fatal failure or any other type of impairment of functions, there is a need to switch the Caching Solution transparently

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 23% of the total text.

Page 1 of 18

Method and System to support multiple Caching Solutions in Java /J2EE applications based of a Consumer Model of the application


Bhavani Eshwar, Deepak Karanth, Suresh Easwaran

Disclosed in the embodiment below is an invention that defines a system and method to -
1. Identify and materialize the Caching Requirements of various modules in an application and define a Cache Consumer Model for the same based of the Categorization of the types of Caches and their allied features
2. Declaratively Configure the type of Caching Solutions being used and which application module is using which Caching solution and what would be the back-up Caching Solution in the event of a failure with the default one which one would act as the back-up
3. Create Model specific adaptors for the Caching Solutions needed to be used
4. Maintain Coherence with Caches across Caching Solutions
5. Implement fail-over to alternative Caching Solutions in case of impairment with the default Solutions
Here below is a brief explanation on how the invention works with the backdrop of a scenario. In a scenario where two Caching solutions are to be used with a J2EE application i.e. Apache JCS and ObjectGrid, is where this invention would come into play.

Some of the terms used in publication for convenience -
CM - Consumer Model: Interfaces used by the cache consumers
CS - Caching solution: Includes the adopters based on the CM for a specific caching product
CP - The vendor specific caching product (ObjectGrid, JCS)

The entire system is created as a framework which would have the three components identified above. Typically all the caching solutions adhere to a set of interfaces defined. In order to achieve better coherence between caching products, the cache declarations for these products have to be made very similar with respect to the features they support. Hence, the caching solution makes use of a single file to store the configuration details. These configuration details will implicitly get transformed into the Caching Solution specific configuration while a Cache from a particular Caching Solution is provisioned.

Cache Types

Local Transaction


A cache which is maintained per Service Request on with add, update and remove features in the realm of the Java/J2EE Application. This will be local to a session with no loading mechanisms or eviction rules. Only the session which creates this Cache will have access to it. It is meant to be thread-safe. Transaction Cache and Local Transaction Cache are interchangeable in this document. Due to the need of size management TTL based eviction rule will be applied. The TTL parameters will be

picked from an external configuration file.

This is Cache which is local to the Application Runtime Instance. It can be loaded fully when the JVM starts or it could be loaded via lazy loading. If the underlying Cac...