In is not possible to dynamically create a finder, because it is not possible to dynamically add a new method to a home interface (not even IBM can do that).
With JBossCMP in JBoss 3.0, you can dynamically generate and execute EJB-QL (and JBossQL) queries. This is described in the JBossCMP documentation available from FlashLine ($10). It is also described in the JBossCMP slides from JBossOne, but thoes slides are getting old.
But so the code is not portable...
Correct. There is no portable way to dynamicly generate and execute EJB-QL queries in EJB.