O'Reilly logo

Mastering Java EE Development with WildFly by Luca Stancapiano

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

Packages and entities

See now what we need to use JPA in our applications. Entities can be used in all applications such as web, EJB, or simply Contexts and Dependency Injection (CDI). Because CDI is included in web and EJB application, we can deduce that the minimum configuration for a JPA applications is CDI. Here is a sample of a JAR--deployable package:

common-test.jar     Entity classes....     META-INF          beans.xml          persistence.xml

The beans.xml in our case is mandatory but it can be empty. The important configuration file in the persistence is the persistence.xml. It contains all information about connections and transactions useful to establish the connection with the database. In WildFly you can add the Hibernate properties too useful for getting ...

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