|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.persistence.interceptors.NoTxMethodCallOnlyEntityManagerInterceptor
public class NoTxMethodCallOnlyEntityManagerInterceptor
This interceptor is used for the Transaction-scoped persistence context when there is no transaction. In this case the persistence context is used only for the method call. Interceptor adds in the thread local a new EntityManager that is closed at the end of the method.
Constructor Summary | |
---|---|
NoTxMethodCallOnlyEntityManagerInterceptor()
|
Method Summary | |
---|---|
java.lang.Object |
intercept(EasyBeansInvocationContext invocationContext)
Creates a new EntityManager before the method and close it at the end. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NoTxMethodCallOnlyEntityManagerInterceptor()
Method Detail |
---|
public java.lang.Object intercept(EasyBeansInvocationContext invocationContext) throws java.lang.Exception
intercept
in interface EasyBeansInterceptor
invocationContext
- context with useful attributes on the current
invocation
java.lang.Exception
- if interceptor fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |