Hi Mohammad,

        Thanks for the answers.  What I proposed was that these be
optional. Only if the developer knows that the names are the same/ or
the type convention is followed he will specify the automapping.
Otherwise he needs to do the mapping himself.

I totally agree with you that it should be in the tools project, and
you are right I saw it in IBM Websphere RAD :).

I just wanted to get that feature in there somewhere as it is very
convenient during development. Please note it as a feature to be added
in the tools sub-project :).

Thanks
Manu

On 2/18/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:
Hi Manu...

If you please, as per my knowledge I want to argue your ideas with you. Your
ideas sounds great, but IMHO I can tell that it will face some technical
difficulties, please see my comments on each idea below



On 2/17/07, Manu George <[EMAIL PROTECTED]> wrote:

> Hi,
>     As per my knowledge, currently in openejb for mapping of the ejb
> fields to the database columns we use the jpa.mapping.xml file. Do we
> still need the cmp.mapping.xml?


I think Dain is the one who can answer this

Secondly does oejb have the ability to automatically do the mapping
> during deployment. eg If the user puts the <automap> tag in the dd
> then openejb should try to auto map during deployment. Probably the
> table names need to be mapped by to the EJB by the user if they are
> different from the ejb names. We can also specify whether the mapping
> should be by name (ejb fields and table fields)or by type.
> This should enable openejb to generate the mapping automatically
> instead of the user specifying them.


First regarding mapping EJB Entity bean(s) and their fields using names, you
have to make sure that the Database designer is following some naming scheme
so OpenEJB can map EJB(s) to table(s) and member field(s) to field(s), which
is not the case most of the time, as the Database design is done parallel to
the Application design and it has to has no effect on  the Application
design at all.

Second, if we will use types instead of names or with names, we can not
guarantee that the Database designer or the Application designer are
following the Java types to Database types *convention* -  and take care
that it is a convention not a standard -, and even, this convention is not
valid for all RDBMS, we faced this situation before here at IBM as we were
supporting more than one RDMBS, and we found that it is not always the same
for all situations.

Some app servers provide this functionality. Is a similar feature there in
> OEJB?


You are right, and sorry if my opinions above can make you disappointed, but
your ideas can be accomplished, but we have to ask our selves, what is the
main target of doing this, IMHO it is to make the development task easier
for developers, but not so hard for Container developers too :), so we can
do the flexibility in another place, which is using Tools - as we started to
have our own Tools project .

The current way is called - in terms of IBM WebSphere - *Meet In The
Middle*, that is you have Database and EJB(s) and you want to map between
them, at this situation you have to have a mapping given to the container.
Another situation, that is you have a Database and want to create EJB(s)
based on this Database. Another one when you have EJB(s) and want to create
Database based on them. All of these situation, which I think are the most
common situations one can have, are supported in a flexible way using IBM
tools - whether WAST, RAD, RSA.

To summarize, we have to invest these ideas in the Tools project not in the
container it self because the role of the container is to find a mapping to
make its job easier and more focused.


Regards
> Manu
>



--
Thanks
- Mohammad Nour

Reply via email to