means an EJB is being setup while this same EJB is being copied in the
interceptor which is quite weird.

Side note: while your FutureDelegator is not wrapping the runnable/callable
submitted you will not get the MDB propagation working I think


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-01-26 11:44 GMT+01:00 cocorossello <[email protected]>:

> I'm not using EjbContext at all. It isn't MDC problem as well, I don't
> really
> know what's going on, the inerceptor is fairly simple.
>
>
>     @AroundInvoke
>     public Object submitAsync(InvocationContext ctx) throws Exception {
>         if (executor == null) {
>             executor = (ManagedExecutorService) new
> InitialContext().lookup("openejb:Resource/TravelcAsynchronousPool");
>         }
>         Future resultFuture = new FutureDelegator(executor.submit(() -> {
>             return ctx.proceed();
>         }));
>         if (ctx.getMethod().getReturnType() == Void.TYPE) {
>             return null;
>         }
>
>         return resultFuture;
>     }
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/MDC-and-Asynchronous-tp4680927p4680940.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to