i wanted to understand how jboss loads the entities resulting from a finder query in case of on-load read-ahead.
i have a scenario as follows -
a bean A is deployed twice - once in RO mode with commit option A and once in RW mode with commit option C IPT. i expect A to be modifed/updated infrequently. I am using a cache invalidation group too.
all this means that most of the time the instance in the cache is valid and as soon as A is updated, the instance in the cache is invalid.
jboss seems to execute the finder as two queries -
one to get the list of valid primary keys and the second to load a subset from this list based on the read-ahead setting
when jboss is loading the entities for read-ahead does it check if there is a valid entity in the cache before including it in the load sql query ? if it does this, it can avoid loading that entity from the db.
i looked up the code of JDBCLoadEntityCommand.java and to me it seems that it doesnt do so. i wanted to get a clarification on this.