Did you analyze the queries sent to the dbms? I noticed that at some point it looks like JBoss runs out of cache memory and then start doing selects like
select id from xxx where (id=1234) OR (id=1235) OR (id=1236) and so on
and then in the next query do
select id from xxx where (id=1235) OR (id=1236) OR (id=1237) and so on
i.e. it fetches data again that it already has fetched. I tested with both commit option A and B and the operation is done within a transaction.
It is the same behaviour as when doing read-ahead without a transaction.