Entity Beans <-> Data model Mapping


EJB design: Entity Beans <-> Data model Mapping

  1. Entity Beans <-> Data model Mapping (4 messages)

    Hi ,
     I am trying to find out what would be the best way to map a complex data model to a CMP Entity Beans object model.
    It seems to me that in such cases, using the EJB 2.0 Entity Beans could be a big performancde overhead!!
    In particular :
    1) If I represent 1 to m/m to n relationships with Collections, will that be a performance bottleneck (too many Entity Beans instances)if the Object graph becomes too complex ?

    2)What if I need to retreive an object which has n Collections associated with it?
    class Employee{
         String name;
         Collection accounts;
         Collection addresses;
         Collection projects;
     Will the container load the whole Entity Beans object graph everytime I retrieve a specific Employee?

    3)If I need to update just one object of the graph? Whats the best strategy to do that?


    Threaded Messages (4)

  2. EJB book[ Go to top ]

    Read the chapters in this book:

  3. EJB book[ Go to top ]

    Use lazy loading and load the collections only when you need to.
  4. EJB LAzy loading[ Go to top ]

    How can I implement a lazy loading strategy for CMP Entity Beans. Can I specify something in the depoyment descriptor?
  5. EJB book[ Go to top ]

    which chapters?