Using the following code in the stateless session bean:
Query q = em.createQuery("from TestBean"); q.setFirstResult(1); q.setMaxResults(1); return q.getResultList();
There is a bug in MySQL reagarding this area, please check either the MySql db or the hibernate forum on that topic,, it has been discussed