@Override public Object invoke(MethodInvocation invocation) throws Throwable { Context ctx = (isEligible(invocation.getMethod()) ? this.jndiTemplate.getContext() : null); try { return invocation.proceed(); } finally { this.jndiTemplate.releaseContext(ctx); } }
proxyFactory.addAdvice(new JndiContextExposingInterceptor(jof.getJndiTemplate()));
@Override public Object invoke(MethodInvocation invocation) throws Throwable { Context ctx = (isEligible(invocation.getMethod()) ? this.jndiTemplate.getContext() : null); try { return invocation.proceed(); } finally { this.jndiTemplate.releaseContext(ctx); } }
proxyFactory.addAdvice(new JndiContextExposingInterceptor(jof.getJndiTemplate()));
proxyFactory.addAdvice(new JndiContextExposingInterceptor(jof.getJndiTemplate()));
@Override public Object invoke(MethodInvocation invocation) throws Throwable { Context ctx = (isEligible(invocation.getMethod()) ? this.jndiTemplate.getContext() : null); try { return invocation.proceed(); } finally { this.jndiTemplate.releaseContext(ctx); } }