> Martin Welch wrote:

> What, for example, is the best way to model an invoice where there is
> a many-to-one relationship of invoice lines to header?
>
> Should I model this as a CMP bean for header, a CMP bean for lines and
> an Invoice stateless session bean that manages the CMP beans?

The best answer depends on how you intend to use the beans at the client
side. Here are some points to consider:

- Do you expect to be dealing with a lot of different clients all
attempting to change the invoice info, or will it remain fairly static.

- How often, as a total percentage of usage, will your code only need to
access a sub-section of the invoice vs accessing the entire invoice.

- Can the body of the invoice share common elements between different
instances. If so, what percentage of the body objects would be shared v
individual per invoice.

In general, an invoice system is most likely to favour the single BMP
approach as invoices are static, you don't share many of the body
statements (if at all) and the need to mainly access the entire invoice.
You should be looking at the granularity a little higher up the scale,
such as the services a particular application needs.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Freelance Java Consultant                  http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
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