HelloWorld JPA application

In this tutorial we will learn how to create a simple Hello World JPA application to be deployed on WildFly or any Java EE container. Create the Maven project We will need a Maven archetype to bootstrap a Web application project. You can use one simple like the following one: mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes \ -DarchetypeArtifactId=webapp-javaee7 \ … Read more

Using LocalDate and LocalDateTime with JPA

One of the core addition of Java 8 is the Date Time API. As most of you probably know, Java has been missing a consistent approach for Date and Time. This approach solves some of the common issues issues with java.util.Date and java.sql.Date messy classes. In this tutorial we will learn how to use LocalDate … Read more

JPA 2.1 tutorial

In preparation for a timely release of Java EE 7 in April 2013, let’s have a look at some interesting features of the JPA 2.1 specification. JPA 2.1 was one of the first JSRs to be filed as part of Java EE 7. Several other specifications in Java EE 7 have released early drafts as … Read more

Hibernate annotations tutorial

In the former Hibernate tutorial we have shown how to create a simple standalone application XML configuration files to map Entities. In this short tutorial we will learn how to replace the Hibernate’s XML class mapping files with simple JPA annotations.   Hibernate, like all other object/relational mapping tools, requires metadata that governs the transformation … Read more

Hibernate tutorial with Eclipse

This is a tutorial about creating a Java application using Hibernate ORM, Eclipse and MySQL Database. Hibernate is an object/relational mapping tool for Java environments. What does it mean the term object/relational mapping? simply a technique of mapping a data representation from an object model to a relational data model with a SQL-based schema. Setting … Read more

Java Persistence (JPA) with JBoss

A major enhancement in EJB technology is the addition of the new Java Persistence API (JPA), which simplifies the Entity persistence model and adds capabilities that were not in EJB 2.1 technology. The Java Persistence API draws on ideas from leading persistence frameworks and APIs such as Hibernate, Oracle TopLink, and Java Data Objects (JDO), … Read more