First off are you doing this in a single transaction?
Are the Person/Address EJBs in a one-to-one relationship? Does Person have a fk for Address?
Do you basically want to read-ahead all the persons and their address? I'm not sure that can currently be done, but I'll think about it while you answer the above questions.
Thanks for the quick response. Yes I'm performing the query in a single transaction because I'm doing it in a Session Bean with the transaction attribute set to "Required". Yes the Person/Address EJBs are in a one-to-one relationship, and yes Person does have a fk for Address. Yes I wondering if I could read-ahead all the Person's and Addresses, and if not, could you suggest some other way to do it that might make things faster? Also when I do the query, in the log file I get this statement: "The Pool for com.vcomponet.doms.ejb.person.PersonCMP has been overloaded. You should change pool parameters." What parameters is it referring to? Thanks I appreciate it!
Have you had a chance to think over my question?
No. I missed it.
No you can read-ahead all persons and addresses, but you can read all persons on-find and when you getAddress it can block load the entire address on-find.
Mark the finder on-find (everything except the address fk field) and mark the relationship on-find eagerload *.
That will work.