Setting cache-between-transactions causes the server to NOT call ejbLoad at the beginning of each transaction. Instead, it remembers the cached data from the last time the bean was used. It uses cache rather than fetching current view from the database every time. This can help performance, but you have to be careful. When you set cache-between-transactions, you are telling the server that you know its cache will always contain good data. If you have multiple things accessing the database, you can not know this. For example if you have a cluster (several servers accessing the database) or maybe the database is accessed by both WLS/EJB and some old VisualBasic application. In these cases, the servers cache might not be up to date, so you can't use cache-between-transactions without risking bad data. In these cases you must use the default behavior where ejbLoad is called for each transaction.
<a href="http://www.tangosol.com/" target="_blank" rel="nofollow">Tangosol, Inc.</a><br /><a href="http://www.tangosol.com/coherence.jsp" target="_blank" rel="nofollow">Coherence</a>: Easily share live data across a cluster!
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop