How to Load the Entities on Cache ?
Hi..
I have an cmp (read only) entity bean , and whenever i calling the bean, its
loading each time in database ,and it results the performance degradation
of the loading of page. Hence i need to keep the cmp entity on memory
cache when the application server starts, so that i will access the entities
on cache memory rather than database each time .
Tell me how to load the entity beam (cmp read only) on memory when the
application server starts ?
[502 byte] By [
003801082a] at [2007-11-27 1:37:17]

# 1
Many Application Servers have special features for CMP beans that are read-only or read-mostly.
It's not required by the EJB specification but it's pretty common.E.g., in SUN's application servers,
you can mark the CMP bean as read-only using the <is-read-only-bean> element in
sun-ejb-jar.xml.You can also set the <refresh-period-in-seconds> element to let the container
know when it needs to be refreshed.Doing so will prevent the majority of the database acceses.
--ken