This week I've been in Westborough, MA again, teaching a servlets and JSP course. The materials are, shall we say, dated, even though they've been revised to use RAD6.

The rest of the time, however, I've been digging into Hibernate. I'll post more later, but I'm going through my list of challenges as I travel the learning curve.

Here's one. If you use the properties file hibernate.properties for database configuration, then you just say Configuration cfg = new Configuration().addClass(…) and then cfg.buildSessionFactory() directly. If you use the XML file hibernate.cfg.xml instead, then you have to say cfg.configure().buildSessionFactory().

That took a lot of time to figure out and I can't find it documented explicitly anywhere.

By Ken Kousen

I am a Java Champion and the author of the books "Kotlin Cookbook", (O'Reilly Media), "Modern Java Recipes" (O'Reilly Media), "Gradle Recipes for Android" (O'Reilly Media), and "Making Java Groovy" (Manning), as well as over a dozen video courses at Safari Books Online. I'm a regular member of the No Fluff, Just Stuff conference tour and have given talks all over the world. Through my company, Kousen IT, Inc, I've taught training courses to and worked with thousands of developers.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.