For me my ejbSelect behaves as expected as far as parameter / return types are concerned. I generate my ejbSelect with XDoclet (using the Lomboz plugin for the Eclipse IDE to be exact). See the topic below for my XDoclet code. Maybe it is of use to you, although I don't think you can make complicated mistakes there; it'pretty straightforward.
However I can't get JBoss to compile my EJB-QL query correctly wich contains the MAX() function. Would you mind sharing how you did that? I hope you're using XDoclet too, or are you coding the deployment xml files files etc. by hand?
In 3.2.3 Max, as well as some other numeric functions, does return double always.
3.2.4 supports EJBQL2.1 and respects the return type of ejbSelect.
It's nice to know, that JBoss returns always double.
I have searched it in the documentation but I haven't found something.
I don't use xdoclet, so i can't help you, sorry. I have written the part of the descriptor by hand, because i have made a migration from weblogic to jboss.
But I will learn xdoclet, can you give me a tip, how i can do this best or where i can find good examples or tutorials?