Wednesday, April 8, 2009

Excellent EJB 3 Persistence Tutorial

It had been a long time since I have visited the land of Java. When I was a regular traveler there, I remember feeling inundated by the rapidly progressing proliferation of APIs. JMS, JNDI, RMI, CMP, and on…and on…and ON. The technologies and vendors were spawning and/or evolving so fast and from so many directions it was difficult to stay current. From what I can see the frameworks have matured and are stabilizing. While there are still many innovations occuring, the rate of change does not appear to be the dizzying pace that I remembered.

To get up-to-speed on the current J2EE release, I dutifully installed the latest version of the open source Java EE 5 implementation…something called GlassFish. It has a decidedly un-Microsoft feel about it. I had flashbacks of all the previous Weblogic/Tomcat/Apache configuration nightmares and had to steel myself for navigation through the narrow passages in the reefs surrounding a modern Java app server. I have found…in general…that Java technologies are much less tolerant of the neophyte and the learning curve seems significantly steeper than the reciprocal Microsoft technology (“platform agnostic”…I know…I know).

I also downloaded the Java EE tutorial and attempted to follow it using Eclipse instead of the recommend NetBeans because I had previously used Eclipse and thought it was generally a great IDE. In doing so, I ran into trouble with creating the EJB example that was entirely related to my inexperience…and the 50 different project types Eclipse now ships with out of the box. I left the Sun script and started working through simple JSP examples just to get some tiny amount of momentum built. After following the online documentation, success was not far behind.

Then I ran across the EJB 3 persistence topic and decided that looked interesting, particularly hibernate.org. The top tutorial on the matter…as declared by Google, was from Web Age Solutions. It was short enough that it didn’t scare me off so I dove in with low expectations of a working example. I was pleasantly surprised by the author’s accuracy and brevity. The logical and successful progression was refreshing and rewarding. By the end of the tutorial, I had a basic understanding of the Java Persistence API (JPA) and a new level of respect for the current Java specification. Bravo!

http://www.webagesolutions.com/knowledgebase/javakb/jkb006/index.html

No comments: