23. A machine readable storage medium having instructions stored thereon that when executed cause a system to: deploy a query component in a container; issue a query, in a transaction, to retrieve a query result from a database, wherein the query result includes one or more instances of a class that is managed by the container, wherein the class represents one or more persisted data entries retrieved from the database and the one or more persisted data entries are associated with at least one row in a table in the database; store the one or more instances of the class in a cache; maintain the query in a query registry with one or more queries; look up the query in the query registry; retrieve the stored one or more instances of the class for the query in the cache when another query matches the query in the query registry; allow the one or more instances of the class to be used concurrently by multiple users using an optimistic concurrency strategy, and wherein, under the optimistic concurrency strategy, the cache management component leaves the one or more instances of the class in the cached query result unlocked when the one or more instances of the class remain unchanged during the transaction; invalidate the one or more instances of the class in the cached query result that are used concurrently by multiple users during the transaction, when a row in the table in the database that is not used by the cached query result is updated or invalidated; and removing the query from the query registry and removing the cached query result with the one or more instances of the class from the cache.
23. A machine readable storage medium having instructions stored thereon that when executed cause a system to: deploy a query component in a container; issue a query, in a transaction, to retrieve a query result from a database, wherein the query result includes one or more instances of a class that is managed by the container, wherein the class represents one or more persisted data entries retrieved from the database and the one or more persisted data entries are associated with at least one row in a table in the database; store the one or more instances of the class in a cache; maintain the query in a query registry with one or more queries; look up the query in the query registry; retrieve the stored one or more instances of the class for the query in the cache when another query matches the query in the query registry; allow the one or more instances of the class to be used concurrently by multiple users using an optimistic concurrency strategy, and wherein, under the optimistic concurrency strategy, the cache management component leaves the one or more instances of the class in the cached query result unlocked when the one or more instances of the class remain unchanged during the transaction; invalidate the one or more instances of the class in the cached query result that are used concurrently by multiple users during the transaction, when a row in the table in the database that is not used by the cached query result is updated or invalidated; and removing the query from the query registry and removing the cached query result with the one or more instances of the class from the cache. 25. The machine readable storage medium of claim 23 , wherein: the query is configured to use a primary key of a data entity in the database.