Is Castor JDO better than EJB CMP?
The relation between JDO and EJB Container-Managed Persistence is more complicated than simply saying, “one is better than the other”. An Entity Bean may manage persistence itself – the EJB specification calls this Bean Managed Persistence (BMP). Alternatively, the Entity Bean may rely on an EJB container to manage all peersistence automatically – the EJB specification calls this Container Managed Persistence (CMP). When implementing BMP, an Entity Bean may use Castor JDO as its persistence mechanism, or it may use others methods, such as dealing with JDBC directly. During CMP, an EJB Container vendor may implement their CMP on top of Castor JDO. In such an implementation, Castor JDO will be used to persist the Entity Bean. If a developer would like to take advantage of an EJB’s life-cycle management, security, the “write once deploy anywhere” promise and other distributed business application facilities, then EJB will be the right choice. Otherwise, the fact that Castor is simple, is
The relation between JDO and EJB Bean is sometimes more complicated than simply saying, “one is better than the other”.An Entity Bean may manage to persist itself. (the EJB specification calls this Bean Managed Persistence, or bmp) It may also rely on its EJB container to do so. (EJB calls this Container Managed Persistence, or cmp).For bmp, an Entity Bean may use Castor JDO as its persistence mechanism, or use another method, such as dealing with JDBC directly, as its persistence mechanism.For cmp, an EJB Container vendor may implement their cmp on top of Castor JDO. In such an implementation, Castor JDO will be used to persist the Entity Bean.If a developer would like to take advantage of EJB’s life-cycle management, security, the “write once deploy anywhere” promise and other distributed business application facilities, then EJB will be the right choice.