Forums Register Login

How does "Entity Bean caching" work ?

+Pie Number of slices to send: Send
Hi,
I'd like to know some details about how a application server caches its Entity Beans.
When i call an Entity Bean's home finder method
from any client, what exactly heapens on the server ? Does it search the line ( or lines ) on its cache, or it makes an database call every time ?
I would like to know what heapen on the server when a Entity Bean tries an SQL like this simple one:
SELECT SALARY from employee
WHERE <CONDITION>
supose the bean tries the following cases to <CONDITION> tag:
First query :
"SALARY > 1000 AND SALARY < 2000"
and later, i tries the second one:
"SALARY > 1000 AND SALARY < 2500"
At the second execution,will the application server query its EJB cache looking for lines that match the query ( in this case all lines that SALARY is between 1000 and 2000 are already in cache, they were stored there by the fisrt execution ) and ask the database only for the lines that is not in the cache yet , or the things dont work like this ??
Is the applications server cache system that smart ? Where to find info about it on the web ?
Thanks in advance.
Claudio Gualberto
+Pie Number of slices to send: Send
hi,
basicly as a developer it's not you concern how the server dose this kind of work , but what you do need to understand is that when you work with cashing it's importent that you don't access the DB directly it can cause inconsistency between the DB and the container.
when you choose to work with server cash then the container decides when to go to the DB and when to go to the cash in order to provide both data consistency and best perfomence. the server decides to save a bean in cash according to the emount of memory and the frequency of the bean use. i dont think that the server is making cashing for the finder methods but i think he dose it for the beans(the real instance of the bean).
if you want more vendore specific information you need to go the the vendors web site(for example ibm for websphere)
permaculture is giving a gift to your future self. After reading this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1341 times.
Similar Threads
JBoss CMP FindBy name in JAWS
CacheFullException
find methods
long post IBM.158
need help in EJB QL with upper and like
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:04:11.