After working with the optimization of my entity beans I have taken the page
load down from 5 seconds to 1 or less by switching to using CMR methods of my
entity beans instead of using the finder methods of the target side of the
relationship. I setup read ahead with on-find and noticed a huge
IMHO using CMR accessors for retrieving the objects on the many-side of a
relationship instead of using a finder could yield better performance in
certain scenarios.
Here's why: the persistence manager always has to sync all in-memory changes of
persistent objects to the database right before
I really appreciate all of the responses I have received so far. I am still
working on fine tuning perfomance of this application using the jboss loading
methods. One problem that I see if that my tables are way too normalized and
this cases performance problems while using entity beans. I am
I have thought about the same thing. Why should I not use a normal finder for
getting the childs. But most likely your FK field is not available as a CMP
field which can be used in EJB-QL.
If you need the bean and the childs in 1 transaction you can consider the use
of left-join read-ahead.
You can also map foreign key fields to the columns CMP fields are mapped to. So
you could add a CMP column that represents a foreign key and use it in queries.
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3856473#3856473
Reply to the post :