System and method for eager relationship caching of entity beans
First Claim
Patent Images
1. A system for caching of entity beans in a server environment, comprising:
- a deployment descriptor file that stores one or more caching element tags for specifying a set of user specified relationships among a plurality of beans wherein said caching element tags are nested to implement multiple levels of related beans such that a bean loads more than one level of related beans;
a server that receives a request from a client to retrieve data from a database corresponding to a first bean and determines an object relationship by parsing the caching element tags in the deployment descriptor file in order to retrieve data for both the first bean and a second bean from the database, as specified by an object relationship determined by the server in parsing the deployment descriptor file and wherein the server also simultaneously retrieves a third bean that is not directly related to the first bean, such that retrieval of the third bean is based on the object relationship between the second bean and the third bean;
an object cache for temporary storage of the data for the first bean, the second bean, and the third bean; and
,wherein a request from a client to retrieve database information corresponding to the second bean causes the server to retrieve data for the second bean directly from the cache, without making another call to the database; and
wherein performance of the object cache is adjusted by setting up multiple levels of caching relationships among the beans by nesting said cache elements within one another in the deployment descriptor.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method for increasing entity bean performance in an application server environment. The system reduces the need for multiple or unnecessary queries by formulating a join query for the related beans and applying this query to the database. When a request is made to a database to read or retrieve a set of EJB beans, related beans are simultaneously retrieved and stored in a cache. In this manner, when the client sends a request for any of these related beans, they can be supplied from the cache rather than making another call to the database.
17 Citations
13 Claims
-
1. A system for caching of entity beans in a server environment, comprising:
-
a deployment descriptor file that stores one or more caching element tags for specifying a set of user specified relationships among a plurality of beans wherein said caching element tags are nested to implement multiple levels of related beans such that a bean loads more than one level of related beans; a server that receives a request from a client to retrieve data from a database corresponding to a first bean and determines an object relationship by parsing the caching element tags in the deployment descriptor file in order to retrieve data for both the first bean and a second bean from the database, as specified by an object relationship determined by the server in parsing the deployment descriptor file and wherein the server also simultaneously retrieves a third bean that is not directly related to the first bean, such that retrieval of the third bean is based on the object relationship between the second bean and the third bean; an object cache for temporary storage of the data for the first bean, the second bean, and the third bean; and
,wherein a request from a client to retrieve database information corresponding to the second bean causes the server to retrieve data for the second bean directly from the cache, without making another call to the database; and wherein performance of the object cache is adjusted by setting up multiple levels of caching relationships among the beans by nesting said cache elements within one another in the deployment descriptor. - View Dependent Claims (2, 3, 4, 9)
-
-
5. A method for caching of entity beans in a server environment, comprising the steps of:
-
providing a deployment descriptor file that contains one or more relationship caching tags for defining a set of user specified relationships among a plurality of beans wherein said relationship caching tags are nested within one another to implement multiple levels of caching relationships such that a bean loads more than one level of related beans; specifying an object relationship between a first bean and a second bean and storing the relationship as a relationship caching tag in the deployment descriptor file; adjusting, by the user, said relationship caching tags in the deployment descriptor file in order to gain an optimal caching performance of an object cache, wherein the caching performance is adjusted by selling up multiple levels of relationships via nesting said caching tags; receiving a request from a client to retrieve data from a database corresponding to the first bean; parsing the set of nested user specified relationships in the deployment descriptor file in order to determine the object relationship between the first bean and the second bean; retrieving data for both first bean and second bean from the database, as specified by said object relationship and simultaneously retrieving a third bean that is not directly related to the first bean, wherein retrieval of the third bean is based on the object relationship, between the second bean and the third bean; deploying the first bean, the second bean and the third bean in an object cache; receiving a request from a client to retrieve database information corresponding to the second bean; and
,retrieving data corresponding to said second bean directly from said object cache, without making another call to the database. - View Dependent Claims (6, 7, 8, 10)
-
-
11. A computer readable medium having instructions stored thereon which when executed by one or more processors cause a system to:
-
provide a deployment descriptor file that contains one or more relationship caching tags for defining a set of user specified relationships among a plurality of beans wherein said relationship caching tags are nested within one another to implement multiple levels of caching relationships such that a bean loads more than one level of related beans; specify an object relationship between a first bean and a second bean and storing the relationship as a relationship caching tag in the deployment descriptor file; adjust, said relationship caching tags in the deployment descriptor file in order to gain an optimal caching performance of an object cache, wherein the caching performance is adjusted by setting up multiple levels of relationships via nesting said caching tags; receive a request from a client to retrieve data from a database corresponding to the first bean; parse the set of nested user specified relationships in the deployment descriptor file in order to determine the object relationship between the first bean and the second bean; retrieve data for both first bean and second bean from the database, as specified by said object relationship and simultaneously retrieve a third bean that is not directly related to the first bean, wherein retrieval of the third bean is based on the object relationship between the second bean and the third bean; deploy the first bean, the second bean and the third bean in an object cache; receive a request from a client to retrieve database information corresponding to the second bean; and
,retrieving data corresponding to said second bean directly from said object cache, without making another call to the database. - View Dependent Claims (12, 13)
-
Specification