Package de.xima.fc.persistence.impl.tx
Class JpaTransactionalInterceptor
- java.lang.Object
-
- de.xima.fc.persistence.impl.tx.JpaTransactionalInterceptor
-
@Interceptor @Priority(2000) public class JpaTransactionalInterceptor extends Object
Runs aJpaTransactionalmethod as a unit of work, so the method body needs no transaction handling of its own.- Since:
- 8.5.6
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectrunInTransaction(javax.interceptor.InvocationContext context)Runs the intercepted method in a transaction, which is committed when it returns and rolled back when it throws.
-
-
-
Method Detail
-
runInTransaction
public Object runInTransaction(javax.interceptor.InvocationContext context) throws Exception
Runs the intercepted method in a transaction, which is committed when it returns and rolled back when it throws.- Parameters:
context- the invocation to run.- Returns:
- whatever the intercepted method returns.
- Throws:
Exception- whatever the intercepted method throws.
-
-