Hi Geert,

> Another major concern regarding performance is finder methods.
> If you need to load say thousands of entity beans from the database,
> how does the spec say the container should do it: row per row or all rows
> at once? If it loads them row by row then entity beans are no good
> in scenarios where you often need to load lots of entity beans.

For CMP, the EJB 1.1 spec allows you to specify whether or not
to load the state of entity beans in finder methods. If you
plan to *use* all the entity beans at the end of the finder method
then of course you would load state i.e. the finders would be along
the lines of:
"SELECT  MyTable.*  FROM MyTable WHERE <some condition>"

of course this would take quite some time if you have a lot
of rows and every instance of the entity bean has to be
either created or updated with the results from the finder
method. (including setting all cmp fields in every instance)

the other option is to *not* load the state but load it only
when necessary i.e. only at the time of actual use. so
the finder the container would use would be along the lines of:
"SELECT MyTable.pk FROM MyTable WHERE <some condition>"

where pk indicates the primary key. of course the above would
execute much faster and you would see huge performance
benefits when the numbers of rows returned by finders are large.

> I am willing to sacrifice inheritance in EJB. But I still need
> decent support for aggregation and as long as that doesn't
> happen I think entity beans are no good. So why doesn't
> the EJB 2.0 get into its final phase?

I am unclear what you mean by inheritance. if you mean one
EJB inheriting or extending from another EJB (say a Session
Bean from another Session Bean), this would be quite
impossible. Of course your remote interface and bean class could
extend other classes but your home interface cannot extend
another home interface. this would be against (java) OO concepts
i.e. your child home interface would not compile as there would
be two create() methods just differing in the return types and
this is not allowed.

I am not willing to comment on other EJB servers (yes i have
worked with a few other the one mentioned below)  ...
but you might want to look at the Borland AppServer 4.5 which
has quite a decent CMP based OR mapping for db
relationships (one-to-many, many-to-many) and the JBuilder Ent 4.0
wizard pretty much automates this task.

or you could go for third party tools (like CocoBase). but
i have not worked with those.

-krish

===========================================================================
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