David,

The answer is "yes" it is very much possible to do so using
CMP but I do not know how many other vendors provide such
a feature.

>The exact mechanism used by the CMP engine varies by database:
>you can use a scrollable cursor; simple iteration through a result
>set (without the overhead of instantiating entity beans); "limit"
>syntax; or "limit/offset" syntax. If any good technique is missing
> I'll be happy to add it.

One of the main concerns is the memory usage increasing
substantially because of the possibly large number of
entity bean instances (for that transaction) representing
the results of your finder method. In most cases, you would
want to stick with cmp entity beans because of their ease
of use, flexibility, maintainability and modularity. A
well designed container will usually provide much better
performance numbers (and throughput) with CMP compared
to its BMP equivalent because of various optimizations by the
container under the hood. This leaves the ejb developer to
concentrate on solving business problems at hand rather
than getting your hands messy developing system level services.

<vendor>
In our current AppServer release, we use 'windowing' when executing
transactions that return (or work with) a large number of entity
beans. That is we keep a 'window' of objects open - representing
a small subset of total number of elements (rows) that exist
and then 'sliding' the window across the total data set dynamically.

So for example if you have a finder that returns half a million
records and your 'window' size is 5000 (configurable via a property),
then there would only exist 5000 entity bean instances at any
given time in that transaction. The rest would be passivated.
This 'windowing' is transparent to the user.
</vendor>

-krish


> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Levine
> Sent: Thursday, November 01, 2001 5:39 PM
> To: [EMAIL PROTECTED]
> Subject: result stepping
>
>
> If I were to use entity beans to represent items in a catalog, and the # of
> items was fairly large (tens to hundreds of thousands), the Collection
> returned by a findBy might be huge.
>
> I can certainly see how one would build a traditional "paging" mechanism
> using BMP (to get only a subset of results, and be able to step forward or
> backwards through the catalog).  But is it possible to do using CMP?  My
> instinct is "no", that this is a case where BMP is necessary.  But I just
> thought I'd ask to see if anyone has thoughts to the contrary.
>
> Thanks,
> David
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to