Extending a entity bean using CMP by a bean using BMP

Discussions

EJB design: Extending a entity bean using CMP by a bean using BMP

  1. Hello,

    I have a requirement in which I have to extend the functionality of an Entity bean using CMP by extending it with a bean using BMP.
    I am confused about the structure of deployment descriptors of both the beans in this case.
    Another doubt I have in mind is about the definiton of ejbCreate method and business methods in BMP. Since CMP bean defines the table name in deployment descriptor what happens if I use a different Database in BMP to update some other table.
    Please let me know the main advantage of extending a CMP bean.

    Thank you
    Parakh.
  2. Firstly, by extending a CMP bean, all of your business methods have been written for you.
    Secondly, when you deploy the bean(s), it will be the CMP version or the BMP version, not both. Thus if you deploy BMP bean, you will not need to specify table names etc in the deployment descriptor.

    What's the main advantage of extending a CMP bean ? What's the main advantage of using inheritance ??

    HTH

    Damian