Hi all, I am new to ORM and JDO so bare with me. I am currently looking at developing an application that can be used across many different databases with a little work as possible. I have had a number of suggestions for people and am now in the process of evaluating the tools available. Here is a list of tools I am looking at: Hibernate CastorJDO. I am not using J2EE so am unable to uses any tool that need the container. I am now confused about the fact the Hibernate states that it is an ORM and not a JDO. Can someone help? Any pointer of Hibernate vs CastorJDO would also be appreciated. Is CastorJDO the best free JDO tool available? Thanks for you help. Chris
Is CastorJDO the best free JDO tool available? Just to confuse you more... CastorJDO is not JDO. JDO is a specification (much like the Servlet or EJB Specification) thats covers transparent persistence on Java objects. Castor does not implement the JDO specification, it is merely JDOish in its approach. I take offense to the false advertising on the part of the Castor group. Many people make the same mistake as you and assume that CastorJDO is... well... JDO. JDO does not rely on a Container like Servlets/JSP or EJB. It does rely on a runtime implementation but that is really not the same thing... it is much lighter. Therefore, JDO does not rely on J2EE and in fact it is not part of the J2EE Specification. However, most JDO vendors go to great length to support a variety of J2EE Containers because that is obviously where the big money is at. Hibernate is very much like JDO, but like Castor, it does not implement the JDO Specification. In most respects, anything that you can do in JDO can be done in Hibernate. Personally, I have a few major issues with the current version of the JDO Specification and for that reason I prefer Hibernate. However, in the future it looks as if JDO and Hibernate will be converging on a lot of the same features due to the fact that Gavin King (Hibernate Creator) is part of the JDO 2.0 Expert Group. I fully expect Hibernate to implement a future version of JDO. You can get the latest version of Hibernate here. You can find a list of OSS JDO implementations discussed in this thread.
Joined: Sep 21, 2003
Thanks Chris, Just out of interest, what are the main problems with the current JDO specs? Chris.
I'm not sure what Chris Mathews answer is going to be, but I don't like the fact that in the current implementation of JDO you have to change the byte code the class that will be persisted. JDO implementations should provide a tool to do this, but it means that your class is actually doing something that is not reflected in your code.
I am not using J2EE so am unable to uses any tool that need the container.
Hibernate is "powerful, ultra-high performance object/relational persistence and query service for Java" and nothing more, it doesn't need container for doing ORM. You can get everything (transactions, cache, etc) without AppServ.
I am now confused about the fact the Hibernate states that it is an ORM and not a JDO. Can someone help?
See topic "My favorite ORM tool and why" I've spend some hours to write in it concectning this question. Main idea is JDO is made for everything and RDBMS, but Hibernate is only for for RDBMS therefore you can get some sugar in terms of persomance. Also when you are using JDO you can leave your knoledge of SQL aside, because JDO (I mean specification) will never give you a chanse to use it, Hibernate also have it's own query language but it's SQL based and you can get Connection every time you need it.
Any pointer of Hibernate vs CastorJDO would also be appreciated.
Hm... it's evident that JDO in pure form (specification) isn't used, I mean without any cheats. Every vendor add it's own improvemens in JDOQL for example, some of them is already used by most of the vendors (like count(*) ).
Is CastorJDO the best free JDO tool available?
It semms for me that definitely not. By the way about byte code manipulation, in J2EE it is not in specification. And also Hibernate is also doing some of it (See CGLIB ) Renat
Joined: Sep 21, 2003
Thanks everyone, you have been a big help. I am now starting to get my head around it. These are really useful tools, my whole approch to database development is starting to change. Chris.