I have an @InterceptorBinding with member value like this:
@Target({ElementType.METHOD, ElementType.TYPE})
@InterceptorBinding
@Retention(RetentionPolicy.RUNTIME)
public @interface Transactional {
boolean value() default true;
}
and an @Interceptor :
@Interceptor
@Transactional
public class TransactionInterceptor {
@Inject
private EntityManager em;
@AroundInvoke
public Object runInTransaction(InvocationContext invocationContext) throws Exception {
// here i want get the @Transactional's member value
I'm using it like this:
@Transactional(true)
public String insertDatatypes(String s1) {
//some logic
...
My question is :
Is it possible to get the value true used in @Transactional(true) in my TransactionInterceptor class ?
Thanks for your help