1 Reply Latest reply on Jun 30, 2004 5:27 AM by Alexey Loubyansky

    Read-ahead cache and transactions

    Sean Blaes Newbie

      I was having a lot of problems with internal locking in JBoss, so I changed most of my get methods to "Supports" rather than "Required" transactions. However, since I've done this, it appears that read-aheads are no longer working. Namely, each time a finder gets called, it is then following by individual select statements. For instance, if I have a finder returning 40 rows, then it's issuing 41 select statements, one for the primary keys and one for each entity. Previously, when I had this problem, setting the read-ahead caching reduced that to two queries, one for the keys, and one for all of the entities. Is a transaction flat out required in order for read-ahead to work? If so, what other techniques can I try in order to eliminate the internal locking issues I was having? If not, what might I be missing...

      I'm using JBoss 3.2.3.