java.lang.Object
io.jooby.ebean.TransactionalRequest
- All Implemented Interfaces:
Route.Aware,Route.Filter
Start a new transaction on each incoming request. Its commit the transaction is no exception is
thrown or rollback in case of an exception.
- Author:
- edgar.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a transactional request.TransactionalRequest(String name) Creates a transactional request. -
Method Summary
Modifier and TypeMethodDescriptionapply(Route.Handler next) enabledByDefault(boolean enabledByDefault) Sets whether all routes in the scope of this decorator instance should be transactional or not (trueby default).Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jooby.Route.Aware
setRouteMethods inherited from interface io.jooby.Route.Filter
then, then
-
Constructor Details
-
TransactionalRequest
Creates a transactional request.This constructor should be used only if you have multiple Ebean installations.
- Parameters:
name- Ebean service name.
-
TransactionalRequest
public TransactionalRequest()Creates a transactional request.
-
-
Method Details
-
enabledByDefault
Sets whether all routes in the scope of this decorator instance should be transactional or not (trueby default).You can use the
Transactionalannotation to override this option on a single route.- Parameters:
enabledByDefault- whether routes should be transactional by default- Returns:
- this instance
- See Also:
-
apply
- Specified by:
applyin interfaceRoute.Filter
-