Hi all, I have a problem :(

I am curious as to the best approach to use when updating multiple entity
beans. In our case there is denormalized data stored from tableA in tableB.
There also exists a 1 to Many relationship between A and B, thus if I update
A i am required to update multiple rows(entities) in B. My question regards
the best practice to use. As I see it I have two options:

        i.  Entity Bean A (or its session bean wrapper) gets a enumeration
of Entity B and updates each bean:
        advantage: all business rules for updating Entity B are preserved
(if any)
        disadvantage: possibly performance hit creating all the EJBs

        ii. Session bean does a direct update to the database
        advantage: high performance
        disadvantage: breaks the model, no guarantee that business rules (if
any) are applied


Obviously in a perfect world option i is the preferred solution. These
entities I have created are quite large (course grained) and loading them
involves allot of work (in some case multiple-table queries).

What have people found when resolving this design problem??

My system is an EJB set of components built onto a legacy (and somewhat
denormalized) RDBMS schema (currently used by a COBOL business application).

(the above is a _very_ simplified overview of the actual problem)

Regards

Rob Masters

Sun Certified Java Architect, Developer, Programmer

Comcare Australia
(w) 02 6275 0632
(f) 02 657 4045
[EMAIL PROTECTED]
http://www.comcare.gov.au

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to