Originally posted by Kartik Patel:
but can someone tell me valid reason of having just CMT for entity bean..
Dear Kartik,
The purpose of the entity bean is to represent some data on the persistence store, provided that the container is responsible for synchronizing the entity instance's state with that store. for example, if a client is calling a business method on the entity bean, the container calls ejbLoad() before the execution of the method, and calls ejbStore() after the method execution has finished and before the transaction is commited. So, If you want the entity bean to be BMT, then
you should handle the entity's state synchronization by calling ejbLoad() and ejbStore() along with transaction control statements (i.e. begin, commit). In that case, you are defeating one of the major services that the EJB container provides and entity beans exist for, which is providing a simple OO view of some entities stored in the persistent storage. That said, if you need to implement these services yourself, then you sould consider writing a POJO to access the persistence store.
Best regards,
[ December 14, 2005: Message edited by: Nadeem Awad ]
Share Knowledge to gain it.<br /> <br />SCJP 1.2, SCDJWS 1.4, SCWCD 1.4, SCBCD 1.3, ICAD