Play Framework 2: Ebean vs. JPA 5

Posted by Jens J├Ąger on November 17, 2013

Everytime you start a new project, you should carefully think about the libraries and dependencies you going to use for your project. This prevents you from building on libraries which will be deprecated in the near future.

In Play Framework 2.3 Ebean will be replaced with JPA. Here is a discussion in the forum about the topic.

The switch is also mentioned in the play roadmap and on Github.

Ebean looks really nice and has some nice features, but when you read some discussions it looks like ebean is mostly unsupported by the original developers, and has some nasty bugs.

JPA implementations like hibernate have bugs as well. But in the end even the nasty ones like HHH-2763, finally get fixed. JPA knowledge is also widely spread in the Java world. If you run into a problem, the chance to get help on stackoverflow or by a coworker is much higher.

For me this means, the big client Play Framework 2 project starting these days, will be based on JPA not Ebean.

The only problem with this approach is that the JPA implementation in play 2 is kind of basic. So we have some work in front of us to make jpa for play more like the ebean implementation or the jpa implementation in play 1.

In the future I will share some of the problems we run into and the solutions we find.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. […] my current play project we decided to use hibernate as JPA […]

  2. […] of the jpa issues I found in play 2 is the behaviour of the transaction […]

  3. A Ebean like finder for JPA - jensjaeger.com Sun, 29 Dec 2013 17:45:33 CET

    […] the decision to go for JPA instead of Ebean with a Play Framework project, the first problem to solve was a replacement for the ebean […]

  4. […] your database related unit tests for a play 2 java application have to handle the fakeApplication startup, load an fresh in memory database and load […]

  5. Paul Wed, 26 Nov 2014 05:34:23 CET

    This didn’t seem to happen. Looking at documentation for Play 2.3.x it still uses EBean as default. Am I missing something? Can you update your post to reflect the current state of direction for JPA in Play Java? Thanks.

Comments

Information about Data protection