Discussions

EJB design: Trade Offs - CMP and BMP in same application???

  1. Trade Offs - CMP and BMP in same application??? (2 messages)

    I want know are there in trade offs in having BMP and CMP in same application. Also considering scenerio that, there may be a BMP Entitiy Bean updating a database table which is also referred by a CMP Entity Bean. Type of CMP Entity Bean can be read/write or read only in this case.
  2. Trade Offs - CMP and BMP in same application???[ Go to top ]

    I would encourage you to use CMP as much as you can.
  3. Trade Offs - CMP and BMP in same application???[ Go to top ]

    I agree with Eric. CMP is are very convenient to develop and most of the time it is efficient.

    To answer your question. There should not be any problem with a BMP modifying the row which is being referred by a CMP assuming that CMP implementes version pattern.

    Version pattern is necessary in following scenario -
    CMP refers to a data row
    BMP updates that row
    CMP updates the data using using the stale data

    In Weblogic 6.1, the default behaviour is when ever a business method is called on the CMP, container does the following
    1. refreshes the data from the database
    2. executes the business method
    3. updates the database.