When developing EJB, you need to sort the return collection, find a circle on the Internet, sad return, the answer cannot be realized, you must write a sort function yourself.
Not willing, I have to try it, this is me, huh, huh, blow big B. The environment I develop is JBuilder X, server JBoss 3.2.5, start writing 'SELECT OBJECT (P) from Activity P where p.Tempid =? 1 Order by P.SuccessLinkID Desc' returning in the Entity's Finder method. The functionality to be implemented is that the object is returned in an reverse order according to the elements P.SuccessLinkID. Published to the server, success, then test, Successful! Good luck! ME!