Impressions from ping conf budapest

Posted by Jens Jäger on January 17, 2014

Here are some impressions from ping conference budapest. Great talks on play framework, scala and functional programming.

IMG_1341

IMG_1402

IMG_1421

IMG_1447

IMG_1390

IMG_1396

IMG_1353

IMG_1344

IMG_1358

IMG_1334

JaxWS with self signed certificates

Posted by Jens Jäger on December 31, 2013

Self signed certificates are common, especially on testservers. The java default solution to add the certificate to every developers and buildservers java vm is a pain in the ass. For the play WS api there is an easy workaround.

To use soap webservices with JaxWS and self signed certificates I found SSLUtilities.java on Srđan Šrepflers Blog.

To use it you have add the following static calls to the class with the webservice call:

Books read in 2013

Posted by Jens Jäger on December 31, 2013

I try to make it a habit to read/listen to 2 business or personal education related books each month. I finally finished the last one today. Here is my read list for 2013 in chronological order:

As you can see, the majority are audiobooks. I try to always listen to a audio book when driving or workout.

Join example for JPA finder

Posted by Jens Jäger on December 31, 2013

The JPA finder for play 2 works with joins as well.

Imagine you have a Task model with a creator:

referenced to a User model with a name:

You can write a method to get all Task for a creator username by joining on creator and access the user fields with the creator.field syntax:

The source code for this example with unit tests is pushed to Play4Jpa

A generic helper for database related tests with play 2 and JPA

Posted by Jens Jäger on December 31, 2013

All 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 the test related fixtures. You need fixy and this helper to do the trick:

To use the helper you just have to extend from ModelTest and override the fixturesToLoad method:

The tasks.yaml loaded in fixturesToLoad must be placed in the conf/fixtures folder of the play application.

The source code is pushed to Play4Jpa repo on github.