[cdi-dev] Thread safety of SeContainer and SeContainerInitializer

Martin Kouba mkouba at redhat.com
Thu Dec 8 04:37:31 EST 2016

I agree with John, it's not guaranteed. However, the original intention 
(based on Weld SE impl) was:

* SeContainerInitializer is not thread-safe and should not be shared 
between threads
* it should be safe to call SeContainer.close() from any thread


Dne 7.12.2016 v 22:01 John Ament napsal(a):
> I would say that this is not guaranteed.
> ------------------------------------------------------------------------
> *From:* cdi-dev-bounces at lists.jboss.org
> <cdi-dev-bounces at lists.jboss.org> on behalf of Laird Nelson
> <ljnelson at gmail.com>
> *Sent:* Wednesday, December 7, 2016 3:56 PM
> *To:* cdi-dev at lists.jboss.org
> *Subject:* [cdi-dev] Thread safety of SeContainer and
> SeContainerInitializer
> Are SeContainer and SeContainerInitializer safe for concurrent use by
> multiple threads?  The string "concurren" shows up only four times in
> the 2.0 specification but not in this context.
> I'm most interested in whether it is guaranteed that one thread may call
> SeContainer::initialize and another may call SeContainer::close.
> I'm assuming that this is /not/ guaranteed.
> Best,
> Laird
> ------------------------------------------------------------------------
> NOTICE: This e-mail message and any attachments may contain
> confidential, proprietary, and/or privileged information which should be
> treated accordingly. If you are not the intended recipient, please
> notify the sender immediately by return e-mail, delete this message, and
> destroy all physical and electronic copies. Thank you.
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.

Martin Kouba
Software Engineer
Red Hat, Czech Republic

More information about the cdi-dev mailing list