Title: RE: OR mapping of table joins for CMP

I would seriously consider going into EJB 2.0 directly, as OR-mapping os so much neater there.
There is tutorials coming up on the sites listed by Joe below, or you could have a look at the EJB 2.0 example called ATM.

But afaik, there is no UML tool that can produce EJB 2.0 entities or descriptors out yet (if someone knows of one, please tell the list).

WR

> -----Original Message-----
> From: Joe Walnes [mailto:[EMAIL PROTECTED]]
> Sent: den 12 september 2000 18:13
> To: Orion-Interest
> Subject: RE: OR mapping of table joins for CMP
>
>
>
> > I would like to learn HOW I can learn this. :) I know nothing of
> > CMP and O/R
> > at this point, so where do I start learning? I can't just load up
> > Orion and
> > blindly code this stuff..is there a good book on CMP and
> O/R with EJBs? I
> > realize each vendor has their own implementation of how CMP
> works, but I
> > would like to know more about it.
>
> Kevin, I recommend the O'Reilly Enterprise JavaBeans 2nd
> Edition book. It
> explains the concepts well and has some simple examples.
>
> The OR features are an added feature in Orion, so it is rare
> to find a book
> that addresses this. I would recommend getting up to speed on
> basic CMP
> first, then have a look at some of the documentation around
> www.orionserver.com and www.orionsupport.com. There really
> isn't all that
> much to OR mapping once you've grasped CMP.
>
>
> > One thing that caught my eye, from what you said, it sounds
> like you don't
> > create database tables from a special tool, then write SQL
> and other stuff
> > to insert, remove, update and search? Is this the case with O/R
> > and CMP? Do
> > you define an entity bean class, and the app server automatically
> > generates
> > a table for you in the database?
>
> This is correct. Orion generates a table and uses a naming
> convention that
> relates to the EJB name and properties. If you are not happy
> with what it
> produces, you can change the deployment configuration to
> suite your needs
> (eg: database object names, column types, mapping styles).
>
> >If that is the case, how exactly
> > does it do
> > this for any database type? I am using Interbase 6.0 at
> home, and the SQL
> > for Interbase (mainly the data types) is different than that of
> > Oracle. I do
> > see the /config/datasource dir that maps various database
> data types..so I
> > am going to take a wild guess and assume Orion uses the
> > information in there
> > for its mappings.
>
> Yup. If you're database isn't there it's painless to create a suitable
> configuration file for the specific mappings.
>
> > Anyways, I would like to buy a book, or see some online
> tutorials on how
> > this all works, and how I can use it. Also, do modeling
> tools (UML) work
> > with CMP and O/R for you? Is it as easy as making some diagrams that
> > describe the database table(s) and it writes the entity
> bean for you?
>
> Tricky one. In theory it should be but in practise it's not so easy.
> Essentially you model in components and objects rather than
> tables so UML is
> well suited. However there are some restictions - most
> noteably inheritance
> (discussed in archives on this list and the Sun EJB-Interest
> list). There
> are ways around this restriction though although they may not
> always be as
> elegant as you would like. However, most of your database OR
> mapping needs
> are catered for by Orion and you can model complicated object
> models with
> ease if you are willing to tinker.
>
> There are UML modelling tools available that can generate
> objects and EJB's
> from UML diagrams - I use Together Enterprise 4. I'm sure
> there are many
> others and it's a matter of taste, but I would recommend you
> get confident
> with generating the EJB's by hand at first before letting a
> modelling tool
> take over.
>
> While in most cases the idea of CMP Entities is what lures
> people towards
> EJB, you will find that there are a lot more features than just a
> persistence layer and generally more scalable apps can be
> developed in less
> time whilst only worrying about the proposed functionality of
> the app -
> issues such as security, integrity, performance, caching, etc
> are problems
> you no longer need to worry about - let the EJB container
> sort these out.
>
> -Joe Walnes
>
>

Reply via email to