CMP 2.0 limitations

Discussions

EJB programming & troubleshooting: CMP 2.0 limitations

  1. CMP 2.0 limitations (4 messages)

    Hi

    I have been looking at EJB CMP 2.0 and JDO for the last few weeks, trying to figure out if we could use any of them for our next project.

    The thing is, we have already have a database schema with an home made persistance layer. We want to switch to a commercial persistance manager, if possible.

    We thought about EJB 2.0 with CMP, but the problem is that we don't have a very simple O/R mapping, i.e. we often have more than one table for one entity. That is a problem with CMP, since there's no way an entity bean can be persisted to more that one table, right?

    Also, sometimes we have one table to store many different entities (inheritance)...

    Is there a workaround for this? Creating a new DB schema and migrating our current application is not an option because we have dozens of (very large) instances of our schema all around (each customer has its own instance). Using database views seems to solve some issues, but not all.

    IMO, JDO suffers from the same limitations...

    We will look at advanced O/R mapping solutions, like Toplink and Cocobase. But, can anybody provide a solution to this problem, or any advice?

    Thanks in advance

    Eric
     

    Threaded Messages (4)

  2. CMP 2.0 limitations[ Go to top ]

    It is possible to map an ejb to multiple tables with EJB CMP2.0 . However considering that you already have a persistace framework( Is this java based) that you probably have used for a while, your best option would be to keep the framework as is. Definitely using commericial OR tools like TopLink will make your life a bit easier.
  3. CMP 2.0 limitations[ Go to top ]

    But can you explain how to map an entity to multiple tables with CMP? I must have missed something because I obviously don't know how to do it.

    TIA
  4. CMP 2.0 limitations[ Go to top ]

    Ok, now I see. You're right! I just found a section of the document I overlooked before! Thanks!
  5. CMP 2.0 limitations[ Go to top ]

    If you are using Weblogic 7.0 app server then this provides a mechanism to allows CMP Entity EJBs to map to more than one table in the database.