O'Reilly logo

Java EE 6 Development with NetBeans 7 by David R. Heffelfinger

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating session beans from JPA entities

One very nice NetBeans feature is that it allows generation of stateless session beans from existing JPA entities, the generated session beans act as DAOs (Data Access Objects). This feature, combined with the ability to generate JPA entities from an existing database schema, allows us to completely generate the data access layers of our application without having to write a single line of Java code.

To take advantage of this functionality, we need to create an EJB project (File | New Project, select Enterprise from the Categories list, then select EJB Module from the Projects list), or use the EJB project from an Enterprise Application project, and add some JPA entities to it, either by manually coding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required