Discussions

EJB design: Does EJB 2.0 affects design patterns (fine vs coarse grained)

  1. Greetings,

    It's almost Xmas and we have now a new toy called EJB 2.0 to play with .

    Depending on the forum I'm involved in or the article I read, I can see a lot of different point of view about EJB 2.0 changes.
    The most controversial one seems to be the following : " Does EJB 2.0 now allow fine-grained entity beans ".
    Some say yes, due to the marvellous Local Interface, some say it does not change anything.

    What about you ? Please share your experience.
  2. I agree with both views. We are doing these to improve performance and it depends the project on hand.

    Local interfaces improves performance by avoiding expensive remote calls. CMR's further eases developing CMP. In some instances local interfaces can not be implemented because entity beans may be in different locations.

    We still need to try to create coarse grained entity beans. But, developing a coarse grained entity bean is more time consuming. This may or may not be worth spending the time and effort for the project on hand. It all depends on the project.

    We still have to use value objects to reduce remote method calls and to reduce propagation of transaction attributes.

    Satish