Andrea,
As Cedric has already said, this is a trivial example which doesn't demonstrate
fragility well.
Given that lets take your example on step farther. At some point in the future the
product component
must be broken into a graph of entity beans. For instance imagine a company that goes
from selling
boxes (single unit products) to assemblies (a aggregation of units). Suppose the
simple existing CMR
relationship must now be replaced by several relationships. How is the Order bean
going to know
about the new interfaces and relationships with out recompiling? How does having CMR
between jar
files help you here?
To maintain flexibility Component B should use ejb-refs to beans in Component A which
provide well
defined views to the underlying data model. The interfaces wouldn't change but the
beans could
provide the same view regardless of changes internal to Component A. In any good OO or
component
design you want to a low degree of coupling between objects/components and a high
degree of cohesion
within a component. CMR gives you the high degree of coupling.
-Victor Langelo
MrMagic wrote:
> > Correct. And that's by design. I would be interested in hearing a
> good reason
> > for wanting two EJB's connected by a relationship but deployed in
> different
> > jars, though... This strikes me as a very fragile design.
> >
>
> I think it would be a very flexible design:
> Component A is a "kern" component, and contains for example a
> "Product" Bean in an e-business application.
> Component B is an "optional" component, that may be present in the
> system or not -- for example this optional component contains the
> "Order" Bean.
> Orders need to have a relationship to Product; Products may not need
> to have a relationship to Order.
> ==> Not all the applications that have Products must have Orders.
> Even more, in that scenario the Order Bean may be replaced with
> another "CustomOrder" Bean, that has for example the same
> relationship to Product.
>
> Where is it fragile? Where is it not flexible? Do you know Apple's
> EOF?
>
> Bye, thanks-
> Andrea Vicentini
--
-------------------------------------------------
"I've figured out the difference between scientific
knowledge and business knowledge. Scientific knowledge
depends on facts, logic, and the rigorous testing of ideas
in the laboratory and the field. Business knowledge
depends on the assertion of pet biases with great
confidence and exorbitant billing rates." --Bob Lewis
===========================================================================
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".