Your first question is unclear.
I'm guessing the answer is <commit-option>A</commit-option>
For the second question.
findAll is executed against the home interface. This requires
and EntityBean without a primary key.
Each will load the data for their transaction.
All finders except findByPrimaryKey bypass the cache.
My first question is I want to cache the CMP EntityBean to the memory! In detail: Such as if my CMP EntityBean corresponding a 10000 rows table, Can I cache the whole table's data into the memory?I think that will promote the efficiency! I got somebody's answer is POSSIBLE! I think I sure write something in the deployment descriptors(those xml files)! But I don't know how to do that! Can you help me?
Another question is how can I only cache 5000 rows data of the 10000 row table?
This article explains caching, in particular commit-option A
i mentioned before.
There is nothing to preload a table into memory.
You would have to extend something in the jboss cmp engine
to do this.
You could do it manually, but less efficiently with a findAll
then a get() on each some field for each primary key.