Are you calling finder and then iterate through the results?
RequiresNew doesn't help here. Because the rows chached will be lost as soon as the transaction completes, i.e. finder successfully returns.
The part that includes finder and iteration should be one transaction to make use of preloading data.
I iterate through the result in the function 'convertFromEntityBeanListToAccountValueListLocal' (see above), but I think this is in the same transaction like 'findAll' (or not??).
The client iterates through the converted List (ValueObjects), do this have any effect to the server??
here is the code of the function 'convertFromEn....' perhaps there is an error I don't see:
* Convert Collection of Entity beans to an ArrayList of Value Objects
* used for local beanlist
* @todo optimize (use local interfaces)
* @todo throw better exception
public static java.util.ArrayList convertFromEntityBeanListToAccountValueListLocal(java.util.Collection entityBeanList)
java.util.ArrayList result = new java.util.ArrayList (entityBeanList.size ());
entityIt = entityBeanList.iterator();
entity = (com.vescon.aum.server.iface.masterdata.AccountLocal) entityIt.next();
result.add (entity.getAccountValue ());
do this function also need a transaction tag??
>I iterate through the result in the function
> (see above), but I think this is in the same
> transaction like 'findAll' (or not??).
The same, unless findAll marked as RequiresNew.
>The client iterates through the converted List
>(ValueObjects), do this have any effect to the server??
When getAccountValue() is called container checks whether the needed fields are already loaded and if not, then it loads them.
Sorry, don't have ideas for now.
I tried some more variants of tags.
After setting the transaction-tags at the right positions AND defining a @jboss.read-ahead tag for the AccountBean it works!!
--> read-ahead works, unoptimized do not!?
I now use read-ahead (like I would do from the begining).
thanks for all your answers,