Hi,
Probably been asked before but I can't find it in archives.
I have a legacy database with over 80 tables, most of them represent many to
many relationships (M:N) just with 2 or 3 foreign keys. I'm building a EJB
layer on top and the initial load is proving to be a bit slow.
An example of software and manufacturer, I want to store all manufacturers
of the current software....
software setEntityContext method:
retrieve the home interfaces for software_manufacturer and manufacturer
beans.
ejbLoad method:
1. run findBySoftware_Id on software_manufacturer bean, which returns a
collection of software_id/manufacturer_id
2. Iterate through collection.
- On the manufacturer bean use findByPrimaryKey with manufacturer_id
from step 1
- add to local collection
This method is great if there are one or two beans but we have thousands and
it takes ages to start up.
I have changed all 1:M relationships to the object relationship methods
detailed on the orionsupport site and it knocked minutes off the startup
time. If I can do the same with M:N it would be great.
Ideas would be appreciated.
Thanks for your time,
Tim.
Tim Squires
Wireless Data Services
----------------------------------------
It's not what you know, it's who you tell.