Hi Anton,

Anton S. Komratov wrote:
The goal of both is to implement persistent. CMP is a part
of EJB server, and OJB is third party product.

Can anybody explain to newbie what are the advanteges of
using OJB when there is a possibility to implement storing
EntityBeans?

EntityBeans have several disadvantages:
- No proper support for inheritance hierachies of entities
- No proper support for dealing transparently with 1:1, 1:n, n:m associations
- Finder methods require sql coding or usage of the awkward EJBQL query language
- EJB CMP does not give you control about the granularity of entity object graphs.
- You also don't have control when to use lazy or eager loading.
- the last two point may lead to serious performance impacts for certain application scenarios.


Some of the above points are adressed with EJB 2.0 and certain CMP implementations. But they are still typical problems.
A lot of EJB patterns is about how to work around inherent problems of the CMP/BMP approach.


A lot of software designers thus decided to not use CMP/BMP in their J2EE applications, but to use classic O/R mapping tools (like TopLink or OJB).

A lot of EJB container vendors are working on JDO implementations. So I personally expect that the JDO specification will be part of the EJB spec at some point in time, and no one will have to use CMP/BMP, but can use a JDO compliant O/R tool.

[Apache Geronimo (the upcoming Apache J2EE Container) will have a OJB-JDO implementation right from the start!]

-Thomas




best regards, Anton Komratov

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to