Hi

I'm trying to figure out how the caching for cmp entity beans works in JBoss. I had 
this (maybee naive) idea that if an entity bean was loaded the cmp engine would load 
this bean only once from the database (One time for each transaction for commit option 
B).

This is the scenario:

I repeatedly call a findBySomeParameter(xxx) within one transaction with the same 
parameters. So the result set is the same each time. The parameters are not the 
primary key.

This results in db access for each find. So it obviously does not use the cache even 
if it sustains one.

I'm using standard entity cmp 2.0 configuration with commit option B and read-ahead 
100 on-load.

I could of course cache this in my own application but isn't this what cmp should be 
good at? I do see that it can be difficult for the container to do this, but all this 
talk about the wonders of the EJB and caches has led me to believe that there where a 
solution to this.

I would really apretiate if someone could explain this to me. How can I code my 
application to make any use of the bean cache?

Best regards
Oystein

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844240#3844240

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844240


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to