Discussions

EJB design: Hibernate VS TopLink VS CMP

  1. Hibernate VS TopLink VS CMP (11 messages)

    Can anyone tell me the advantages or disadvantages of Hibernate over TopLink(or any other O-R mapping tools) and also over CMPs

    Thanks

    Suresh

    Threaded Messages (11)

  2. Hibernate VS TopLink VS CMP[ Go to top ]

    Can anyone tell me the advantages or disadvantages of Hibernate over TopLink(or any other O-R mapping tools) and also over CMPsThanksSuresh
    They all suck. Use JDBC.
  3. Make very sure that your system needs justify the 10-15% overhead of any O-R mapping tool. Questions to ask are: Does your data object model look like a monster? Do you have tons of data objects to manage? Your programmers have never heard of SQL queries?

    If you still want to use O-R tool, then CMP is going to change a lot in EJB3. You would rather not use it at this point of time. Hibernate is a good choice if your company has no objections to open source solutions like my company has. You might also want to consider JDO. I have no experience with TopLink but it helps to know that it is from Oracle :)
  4. Toplink is not from Oracle[ Go to top ]

    ... I have no experience with TopLink but it helps to know that it is from Oracle :)

    It's not. Oracle acquired Toplink from WebGain, which acquired it from The Object People. Toplink has been there from the early 90's. We did our last project with Toplink and Oracle's J2EE server (OC4J), which, btw, Oracle licensed from Ironflare (a Swedish company) after some futile development attempts of their own. That's the thing about Oracle: their tool palette is incredibly broad and sometimes of mediocre quality, but Toplink seems to be an exception, since to our experience it's a robust and production-ready tool, and Oracle up to now Oracle seems to execute the wisdom NOT to kill it through too many, too fast major changes.
  5. Hibernate VS TopLink VS CMP[ Go to top ]

    I have no experience with TopLink but it helps to know that it is from Oracle :)

    Until recently it was not from Oracle and at that time it was the most popular OR-mapping tool, although you had to pay for it. At this moment Oracle supports it at a level that it still works as great as it used to do. This makes me wonder how it could help to know that it is from Oracle.

    Jan Kettenis
    (just curious)
  6. We haven't tried Hibernate, we chose Toplink as we run Oracle 9IAS and Oracle DB. We've had some bad experience with CMP mostly because we had very little inhouse experience using them.

    We've been using Toplink for quite few months. We are amazed on how Toplink handles the O/R relationships (BTW, we used JDBC/SQLJ in all our prev. projects and it took us a loooong time to finish up with our JDO objects). We have no complaints on runtime but we faced lot of hurdles learning the tools and API. The tools which come with Toplink are not very robust and you have really work around to fix something. But if anyone spends enough time, I am sure they'll like it. It is an impressive piece of technology.



    Venky
  7. Does anyone have experience using Toplink with non-Oracle products such as IBM WebSphere and IBM UDB? Does the use of Oracle AS and DB make a difference in selecting Toplink from a technical perspective?

    Robert
  8. It works well with UDB[ Go to top ]

    I have used it with UDB. It works well.
  9. Hibernate VS TopLink VS CMP[ Go to top ]

    Well, I didn't expect this answer. If this is true, can we come up with patterns or strategies where these tools can be used and where they cannot be used.Many might have given their opinions, but something concrete.

    Thanks

    Suresh
  10. ...[ Go to top ]

    So far my experience is that JDBC/SQLJ is fine for certain projects. But then those projects grow, or branch, and/or intermingle. And then you abstract all that code into a DAO because your conscience tells you to (right?)... and then your co-workers see your DAO and want you to create a .jar for it... and then that .jar winds up in App B... and then they want more features in the DAO, and then...

    So why are we rewriting Hibernate or TopLink?
  11. what about value[ Go to top ]

    Sure there's the X's and O's of who's better than whom, but let's not forget one factor: Cost! TopLink is free for educational purposes, but in production it costs $5000/per processor! That would be $40,000 for our two quad processor nodes. Hibernate is open source. I've used both to some degree, and I think TopLink is more mature and robust, but not worth the price tag for us. If you've got the budget and the need for the few extra features, go for TopLink. I'll stick with hibernate because it works great and it's free.
  12. TopLink Essentials is Free[ Go to top ]

    A year has passed since Mike's post. Meanwhile, Oracle has an Open Source product called TopLink Essentials, a JPA implementation based on TopLink. Binaries and source are available for free as in beer from the above link on Oracle's site. I guess you could use it for standalone persistence like Hibernate, but Sun has integrated it into Glassfish, their Open Source reference implementation of JavaEE 5 with EJB 3.0., where it provides the JPA functionality. Inside Glassfish, TopLink Essentials translates into two Jar files among all the others that make up the app server. Thus, the database muscle of TopLink is now available gratis to anyone who cares. Of course the first DB to be supported was Oracle, but it meanwhile does:
    • Oracle
    • Cloudscape
    • Derby
    • DB2
    • Sybase
    • SqlServer
    • Informix
    • PointBase
    • MySql and
    • PostgreSQL.
    Sun probably had good reasons to go with this in their reference implementation, but I want my Firebird, so I'm going to try slipping Hibernate underneath Glassfish. I read somewhere that it's really easy.