org.apache.myfaces.extensions.cdi.jpa.impl.transaction
Class TransactionalInterceptor

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jpa.impl.transaction.TransactionalInterceptor
All Implemented Interfaces:
Serializable

@Interceptor
@Transactional
public class TransactionalInterceptor
extends Object
implements Serializable

Interceptor for wrapping transactional database requests.

See Also:
Serialized Form

Constructor Summary
TransactionalInterceptor()
           
 
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
 

Constructor Detail

TransactionalInterceptor

public TransactionalInterceptor()
Method Detail

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-2012 The Apache Software Foundation. All Rights Reserved.