you can do this by using Jboss specific sql.
in your jbosscmp-jdbc.xml file, you can add something like :
<jboss-ql><![CDATA[SELECT OBJECT(a) FROM table as a LIMIT ?1]]></jboss-ql>
This is nicely documented in the free online documentation.
Be aware that this overrides a method in your ejb-jar.xml ! So you must also have a query in your ejb-jar.xml file, but this one will be overriden by the query in your jbosscmp-jdbc.xml file.