[2.4.x Java] Deadbolt for Java 2.4.1 released

33 views
Skip to first unread message

Steve Chaloner

unread,
Aug 18, 2015, 1:45:53 AM8/18/15
to play-framework
Deadbolt for Java 2.4.1 was released yesterday, with support for JPA (see https://github.com/playframework/playframework/pull/4225 for why it needs to be blocking).

The dependency is "be.objectify" %% "deadbolt-java" % "2.4.1"

From the Quickstart:

If you're using JPA, there's a good chance you're going to run into issues when entity managers are used across different threads. To address this, you can put Deadbolt into blocking mode - this ensures all DB calls made in the Deadbolt layer are made from the same thread; this has performance implications, but it's unavoidable with JPA.

To switch to blocking mode, set deadbolt.java.blocking to true in your configuration.

The default timeout is 1000 milliseconds - to change this, use deadbolt.java.blocking-timeout in your configuration.

This example configuration puts Deadbolt in blocking mode, with a timeout of 2500 milliseconds:

deadbolt {
    java {
        blocking=true
        blocking-timeout=2500
    }
}

Thanks for Matthias Kurz for his contributions!

Reply all
Reply to author
Forward
0 new messages