8 Replies Latest reply on Mar 25, 2004 10:54 PM by jboss fan

    CMP vs. BMP

    rais Newbie

      I need to know what is the fastest cmp or bmp. I read in article below, that you should always use CMP.

      Chapter 6

      Whenever possible, use container-managed persistence (CMP) rather than bean-managed persistence (BMP) In BMP, the bean provider codes database access calls using JDBC, SQLJ, and so on in bean methods. In CMP, the container provider tools generate database access calls at the enterprise bean's deployment time. The bean provider must specify, in the deployment descriptor, the list of instance fields for which container provider tools must generate access calls. CMP has the advantage that the bean class can be independent of the data source. Another advantage is that application vendors generate optimized code for CMP to improve database access performance.