org.apache.myfaces.extensions.cdi.jpa.impl
Class TransactionalInterceptor
java.lang.Object
org.apache.myfaces.extensions.cdi.jpa.impl.TransactionalInterceptor
- All Implemented Interfaces:
- Serializable
@Interceptor
@Transactional
public class TransactionalInterceptor
- extends Object
- implements Serializable
Interceptor for wrapping transactional database requests.
- Author:
- Gerhard Petracek
- See Also:
- Serialized Form
Method Summary |
Object |
executeInTransaction(javax.interceptor.InvocationContext invocationContext)
Creates a transaction before the intercepted method gets called and commits or reverts it after the invocation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TransactionalInterceptor
public TransactionalInterceptor()
executeInTransaction
public Object executeInTransaction(javax.interceptor.InvocationContext invocationContext)
throws Exception
- Creates a transaction before the intercepted method gets called and commits or reverts it after the invocation.
A
PersistenceStrategy
is allowed to begin the transaction lazily but
it has to support nested interceptor calls.
- Parameters:
invocationContext
- current invocation-context
- Returns:
- result of the intercepted method
- Throws:
Exception
- exception which might be thrown by the intercepted method
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.