@ApplicationScoped public class TransactionHelper extends Object
Attention: please be aware that this helper only works for @Transactional with the default qualifier! If you need the functionality for another EntityManager, then you need to copy this code and adopt it
Usage:
Constructor and Description |
---|
TransactionHelper() |
Modifier and Type | Method and Description |
---|---|
<T> T |
executeTransactional(Callable<T> callable)
Execute the given
Callable in a Transitional manner. |
static TransactionHelper |
getInstance() |
public static TransactionHelper getInstance()
@Transactional public <T> T executeTransactional(Callable<T> callable) throws Exception
Callable
in a Transitional manner.Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.