Saturday, June 03, 2006

Do You Hibernate?

The newest technology on the block in terms of data access from relational databases is Hibernate, currently in version 3.x. I've heard a lot about it, but I hadn't really programmed with it. Today I finally started, and I must say it is a whole lot simpler than session/CMP EJBs I've had to write in the past. Best of all, I can still use my favorite database (Microsoft SQL Server 2000) and JDBC driver (jTDS). Also, there is a whole lot less code to write: only 3 Java classes, a couple of configuration files, and an ANT build file.
Most libraries required come with the Hibernate download, but surprisingly, the hibernate3.jar library is not included. I had to download it separately. In the next few posts, I'll be working on creating schemas, modifying schemas, creating/deleting/updating tables, and working with JDBC connection properties (pools and sessions, optimization).
Some basic requirements to get rolling:
  1. JDK 5.0 SE.
  2. Apache ANT (needs additional libraries from Hibernate)
  3. Hibernate itself.
I expect to convert my current EJB-based data models in current projects (yes, including my favorite Jaspora) to Hibernate data access by the end of August 2006, so I'm on a roll. Just need to gain enough experience with the technology before it becomes a business initiative.

No comments: