posted 17 years ago
I am not sure if this is entirely accurate, but these are my thoughts.
Entity Beans exist because there is an entity in the DB that they represent. CMP fields representing the complete entity are declared in the DD, along with abstract getters and setters.
On the other hand, with BMT, the bean manages DB access code by itself upon notification from the container. That means, we could do DB access code or do nothing in the BMT container callback methods. But with CMT, container is in charge of putting the required code for DB access.
This makes me think that a BMT bean is not tied to any real entity. And if its not tied to any real entity, it cannot be an entity bean.
Another point to note is that if a session bean uses an entity bean and if the session bean is in a transaction and wants the entity bean (DB) updates to happen as a part of the same transaction, only CMT would support it. With BMT, the entity bean methods would run in a seperate transaction. So, a scenario like "Insert New Customer through a session bean which uses entity bean" will run into issues.