Coarse Grained Entity with CMP

Discussions

EJB design: Coarse Grained Entity with CMP

  1. Coarse Grained Entity with CMP (1 messages)

    Is there any specific way to implement a coarse grained entity bean (CMP) with dependent objects . B'cos the examples I saw in the SUN J2EE patterns explains only BMP and not the CMP. Pls do advise.
  2. Coarse Grained Entity with CMP[ Go to top ]

    My suggestion: avoid. It sounds so tempting at first: object-oriented, easy to manipulate, whatever. But the real dirty implementation details make it very hard bordering on impossible (even with BMP! I think coarse CMP is impossible bordering on impossible, though I could be wrong). Better way IMO is to have CMP beans directly reflect the data model with one bean class per table and one bean per row (yes this betrays the whole point of hiding the database implementation from the objects, but oh well). I used a home-brew to make my CMPs automatically and I've never looked back.

    - Jim