If a picture is worth a thousand words, this short Java EE 5 video by Binod is well worth the 5 minutes you’ll spend watching it.
In a nutshell – EJB 3 entity, Derby, JSF, GlassFish, all from NetBeans.
Demonstration is described here.
… and if you’re suspicious about what the IDE does under the covers, check out:
– Introduction to using Java Persistence API in a web application in Java EE environment
– Converting a POJO to a Persistent Entity