Hi I'm new here. Nice forum. Well, now, here's my question. Is there a tool that generates O/R mapping for EJB 2.0 CMP beans? I'm looking at CMP for our next project here, we didn't decide to go ahead with it yet. I thought that Weblogic would provide a tool to create O/R maps to the RDBMS, but I can't find any? I don't think that coding all the mapping by hand is a good thing, we have a HUGE data model. Am I missing something? Also, any thoughts on CMP 2.0? It looks nice... On paper that is!! we will definitely test it in the next few weeks... Thanks! [ June 28, 2002: Message edited by: Eric Morin ]
I've used EJB CMP/CMR and EJB QL. It is very productive. I wrote my own code generator that would inspect JDBC metadata from a few tables and generate all of the needed files (including Struts forms, JSP, EJBs, etc.) It is really easy to do since the metadata from JDBC is so rich. I now use XDoclet, and think the world of it. There is a tool called Middlegen that I have heard good things about. (link to middlegen bellow). CMP/CMR and EJB QL makes EJB more useful. XDoclet makes EJB's easier to develop. Check out this posting... EJB is useful and getting even more so!
CMP/CMR and EJB QL are very productive. Check out this 4 part tutorial that is on developerWorks. Here is a site that explains the 4 part series.... (I think this will help you get started) 4 part series on EJB 2.0 CMP/CMR and EJB QL I've used EJB CMP/CMR in many production systems. It saved us a lot of time, and energy. Here is the link to MiddleGen. MiddleGen
Thanks Rick. I saw your earlier posts about CMP/CMR and XDoclet. What I do find hard to believe is the fact that BEA doesn't package any tool to generate O/R mappings. Is it the same thing with other EJB containers? We already have an in-house persistence management system and we are looking at commercial products to possibly "replace" it. This is also part of a rather large architecture project. EJB is, of course, a possible target. I already have some experience with EJB 1.1, but mainly BMP. I thought that CMP in EJB 2.0 was promising, but I find the lack of available commercial tools for mapping (and support from container providers) kind of scary. And I'm not ready to move to Toplink or Cocobase yet... Is CMP in EJB 2.0 enough for medium to large projects? I'm thinking like 50-60 developers... Thanks!
posted 18 years ago
Hmmm..... 50 or 60 developers on one project that sounds pretty big....
We have many teams working on different sub-projects but everyone is working with the same entities. The datamodel has up to 200 tables, the application has more than 800 different JSP pages. And of course, we have heavy traffic. Our current setup doesn't use EJB, and is running on JServ. We have up to 10 app servers, each running many instances of the application. We are using servlets, JSP and JDBC with an in-house persistence manager, with a distributed cache management system. It's also meta-data driven. So far, the system does scale pretty well, but we have many problems, mainly because each team is working differently and we lack uniformity. We are looking at a major architecture project to move to J2EE and EJB. What do you think? I have many doubts. Performance is one, of course. But also the O/R mapping problem, and the fact that, by itself, EJB doesn't do as much as our current persistence system...
posted 18 years ago
You asked what do I think.... It is hard to say without all the facts. I know we switched to CMP/CMR and we had our own internal OR/Mapping tools. Maybe try CMP/CMR on new pieces of the system, and if you like it... gradually change over. Or if you cannot switch over the whole system (no budget)... just do the new pieces/features in CMP/CMR.