Hi guys,

a quick heads up to say I changed the way we look up CDI context
(WebBeansContext to be concrete).

Before we had some fallback logic to find it if all known ones failed. This
was acceptable maybe in flat (1 webapp or 1 ejbjar *only*) embedded mode
but was quite broken in other modes leading to really annoying conflicts
(see TOMEE-1913 for one of the cases).

the build
https://ci.apache.org/builders/tomee-trunk-ubuntu/builds/495/steps/test/logs/stdio
is back to stable (the only failing module is removed in next commit cause
it was legacy already).

Just want to point out that now currentInstance() will throw an
IllegalStateException if the webapp hasn't CDI (there is a spec ticket to
ensure it is what we want but seems it will atm)

Happy to help you investigate some cases if you have doubts.

PS: a nice side effect is we now don't create a fake WebBeansContext
anymore when CDI is not active and leak it which was the case before if you
deploy another webapp with CDI activated in embedded mode.

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

Reply via email to