Discussions

EJB design: BMP for Entity Beans

  1. BMP for Entity Beans (4 messages)

    Quick Question....

    Can we apply Bean Managed Persistence to Entity Beans?

    If you say 'yes', then pls refer to this material at

    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction4.html

    , which says BMP is for Session and Message-Driven beans only.

    Would appreciate, if someone could explain this

    Threaded Messages (4)

  2. Hi If you read the stuff correctly at the URL given by you , it talks about Bean Managed Transactions not Bean managed persistence.There is a difference right.
  3. Thanks for the clarification.

    Then, y Bean Managed Transactions cannot be applied to Entity Beans.
  4. Thanks for the clarification.

    >
    > Then, y Bean Managed Transactions cannot be applied to Entity Beans.

    Correct. This was one of the changes made between EJB 1.0 and EJB 1.1, if I recall correctly.

    Randy
  5. To know this, we need to look into how EJBLoad and EJBStore works for entity beans. The EJBLoad and EJBStore methods are called with the start of a new transaction - not with every method call. Thus one transaction wraps a EJBSLoad call, several business method calls and a EJBStore call. This being the case, a bean managed transaction is not feasible since EJBLoad and EJBStore are container's call back menthods over which we have no control.