« Using JMX to update threadpools without a restart | Main | 2PC = atomicity? Maybe »

September 07, 2003

JDO and CMP 2.0

A lot of people say JDO is better, vendors say CMPs are the standard. I don't think it matters to tell you the truth. The bottom line is that CMP 2.0 should perform as well as JDO in all but a single aspect.

CMP objects are managed J2EE components. They have a managed environment. They have declarative security, a env section in JNDI etc. JDO objects don't have this. This environment is setup on every method call and removed when every method call returns.

This preinvoke/postinvoke doesn't seem to be required in the JDO model. My experience is that calling pre and post invoke on method calls costs around 4-5% CPU path length depending on the application server. This isn't a lot for me, given the typical sorts of performance problems I've seen, i.e. taking this 4-5% out of the path length won't solve them problem.

As CMP and JDO implementations mature, I expect both to offer the same feature sets in terms of optmizations etc, i.e. both can be made to be identical in terms of JDBC/caching performance. The remaining difference in performance is this 4-5% cost of supporting the J2EE entity bean versus using just JavaBeans as the component and like I said, if it's come down to just this being your performance problem, you don't have a problem :)

September 7, 2003 in J2EE | Permalink

Comments

Hi, Billy.

I've been looking at replacing the persistence layer of an evolving enterprise application. We're currently still WAS 4.0.x but migrating to WAS 5.0 "any day now".

My team has used CMP EJB 1.1 before and felt that the development/deployment burden of EJB was too hefty. Our current persistence layer is a generated DAO layer that, while it can change rapidly, infects the rest of the application with too much persistence knowledge and structure. I'd like to return to more OO roots with the object model being what the application developers truly work with. This is where I think JDO really has play. It isn't so much the technology itself as the impact the technology choice has on application structure.

Do you know whether any of the current JDO vendors has a significant relationship with IBM? I'd be primarily interested in those that have worked to ensure a robust integration with WAS.

Thanks.
Jim Cakalic

Posted by: Jim Cakalic | Sep 29, 2003 11:07:58 AM

I don't agree. JDO will need to expose the same types of artifacts as CMP does. Bottom line is that you'd need to wrap both with a fascade pattern, probably based on a session bean. You are then free to hide/expose as much of the underlying stuff as you choose.

WSAD 5.1 has had MAJOR work done and basically the huge wait times generating CMPs are gone now. RMIC dominates gen time.

Posted by: Billy | Nov 8, 2003 10:08:33 PM

Post a comment