-
1. Re: Eager/lazy loading of EJB 2.0 relationships
fred Nov 29, 2001 2:37 PM (in response to zetzet)Use the eager-load/lazy-load descriptor directives, cf. JBoss 3.0 manual CMP 2.0 appendix.
-
2. Re: Eager/lazy loading of EJB 2.0 relationships
dsundstrom Dec 3, 2001 1:30 PM (in response to zetzet)JBossCMP alpha does not support eager or lazy loading of relationships. I plan on adding support eager/lazy loading of relationship foreign keys, but that would not apply to the many side of a one-to-many relationship.
So the question is what are you seeing?
-dain -
3. Re: Eager/lazy loading of EJB 2.0 relationships
zetzet Dec 12, 2001 4:12 AM (in response to zetzet)Hi,
> JBossCMP alpha does not support eager or lazy loading
> of relationships.
> [..]
> So the question is what are you seeing?
From our experience, the strength of an EJB
CMP implementation can be measured looking at
the "500 list items" case:
What happens when an entity (e.g. an Invoice) has
a larger (but still reasonable) count of dependent
entities (e.g. InvoiceItem's).
Does the CMP engine generate 1+1+500 JDBC calls
or 1+1 (or anything < 10) JDBC calls?
EJB CMP 2.0 (local interfaces + relationships) is
the first EJB standard that comes close to
a reasonable persistence layer, but of course
this doesn't help if your CMP implementation
makes "usual" relationships (>10 but < 10000)
unusable from a performance standpoint.
Bye,
Jürgen -
4. Re: Eager/lazy loading of EJB 2.0 relationships
dsundstrom Dec 12, 2001 11:50 AM (in response to zetzet)> From our experience, the strength of an EJB
> CMP implementation can be measured looking at
> the "500 list items" case:
> What happens when an entity (e.g. an Invoice) has
> a larger (but still reasonable) count of dependent
> entities (e.g. InvoiceItem's).
ok
> Does the CMP engine generate 1+1+500 JDBC calls
> or 1+1 (or anything < 10) JDBC calls?
Currently, I think it does the 500 calls, but none of the cmr code has been optimized yet. CMR in the alpha is in the prove that it works phase. I hope to have support for relationship readahead code in the next alpha.
> EJB CMP 2.0 (local interfaces + relationships) is
> the first EJB standard that comes close to
> a reasonable persistence layer, but of course
> this doesn't help if your CMP implementation
> makes "usual" relationships (>10 but < 10000)
> unusable from a performance standpoint.
Now that is not very nice. This is a group effort, so if you find a performance problem bring it to our attention (the more detail the better). Then help think of a solution, but under no circumstances are you just allowed to bitch about "your CMP implementation." -
5. Re: Eager/lazy loading of EJB 2.0 relationships
zetzet Dec 14, 2001 7:10 AM (in response to zetzet)Hi,
> think of a solution, but under no circumstances are
> you just allowed to bitch about "your CMP
> implementation."
SORRY!
I really didn't want to say anything bad about
Jboss, and the "your" in my e-mail was perhaps a
bad wording (i'm not a native speaker): it should
not mean the "JBoss implementation" but "the
CMP implementation you use in your application".
Bye,
Jürgen -
6. Re: Eager/lazy loading of EJB 2.0 relationships
scruntime May 14, 2002 11:49 AM (in response to zetzet)Has this (lazy loading) now been implemented in JBoss 3.0 RC1?
Can you achieve the same effect by using BMP and integrating with Castor as described here:
http://www.jboss.org/developers/jboss-castor.jsp
thanks very much
Steve