O'Reilly logo

Advanced Java® EE Development with WildFly® by Deepak Vohra

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

Creating entities

In EJB 3.x, an entity is a POJO (Plain Old Java Object) persistent domain object that represents a database table row. As an entity is a Java class, create a Java class in the jboss-ejb3-ejb subproject of the jboss-ejb3 project. Select File | New. In the New window, select Java | Class and click on Next:

Creating entities

Select/specify jboss-ejb3/jboss-ejb3-ejb/src/main/java as the Java Source folder, org.jboss.ejb3.model as the Package, and Catalog as the class Name. Click on Finish:

Creating entities

Similarly, add Java classes for the Edition.java, Section.java

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