Add the following code under EJB-JAR.XML:
.......
FindBynamelike method-name> java.lang.string method-param> method-params> query -method> query> entity>
Add the following code under jbosscmp-jdbc.xml:
......
FindBynamelike method-name> java.lang.string method-param> method-params> query -method> Select Object (c) from county as c where c.name like control ('%') ORDER BY C.ID DESC JBoss-QL> query> Entity>