JBoss.org Community Documentation
The none
strategy is really an anti-strategy. This strategy causes the system to fall back to the default lazy-load code, and specifically does not read-ahead any data or remember the order of the found entities. This results in the queries and performance shown at the beginning of this chapter. The none strategy is declared with a read-ahead element. If the read-ahead
element contains a page-size
element or eager-load-group
, it is ignored. The none strategy is declared the following example.
<jbosscmp-jdbc> <enterprise-beans> <entity> <ejb-name>GangsterEJB</ejb-name> <!-- ... --> <query> <query-method> <method-name>findAll_none</method-name> <method-params/> </query-method> <jboss-ql><![CDATA[ SELECT OBJECT(g) FROM gangster g ORDER BY g.gangsterId ]]></jboss-ql> <read-ahead> <strategy>none</strategy> </read-ahead> </query> </entity> </enterprise-beans> </jbosscmp-jdbc>