users@glassfish.java.net

Iteration order with CMP

From: <glassfish_at_javadesktop.org>
Date: Fri, 14 Nov 2008 11:40:16 PST

Hi,

This might be a silly question. I was wondering what item order I should expect in a collection of items received from the finder exception of a CMP EntityBean. I can't find any information on that. I'm calling a stateless SessionBean, in witch I defined a collection filled from a find*ByPrimaryKey call. Every time I'm calling the SessionBean, the order of the collection is changing. The examples I saw made me expect that using an Iterator over a EntityBean collection would list the beans in the order returned by the database, but the order is changing at every new request.

Thanks.
[Message sent by forum member 'phill68' (phill68)]

http://forums.java.net/jive/thread.jspa?messageID=316840