O'Reilly logo

Java EE 7 Development with WildFly by Francesco Marchioni, Michal Matloka, Michal Cmil

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

Adding persistence to our application

In order to persist data, JPA needs a relational database; we will use the PostgreSQL database, which is pretty popular among developers and can be downloaded for free from http://www.postgresql.org/download/. It is recommended to download the latest stable release of PostgreSQL 9.x and install it using the simple installation wizard. If you don't need a full-blown database, then keep in mind that later we will also show you how to use an in-memory database provided by WildFly, which can be a really useful alternative during development.

Setting up the database

We will create a database named ticketsystem; we will then add a user named jboss and assign him/her all privileges on the schemas.

Open a shell under ...

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