With 3.2RC3, you can access the EJB's cache MBean and call its flush() method. Every Entity bean has the following three entries:
The first represents the cache for the entity bean, the second the pool of entity beans used for creation and finders, and the third the bean itself.
The Cache MBean has a flush() method that you invoke either programmatically or from the jmx console (machine-name:8080/jmx-console)
Hope this helps..
Continuing my investigations, I replaced my EJB-QL with a declared-sql where I place a LIMIT statment (postgresql).
When my first select (the one that triggers the performance problem) have a resultset with about 1500 rows, some finders begin to take more time to execute. From 1 or 2 seconds to 5 or 10 to retrieve only one row.
Is there a thing to know about the EJB Management in JBoss to never reach this limit ?