[
https://issues.jboss.org/browse/CDI-726?page=com.atlassian.jira.plugin.sy...
]
Romain Manni-Bucau edited comment on CDI-726 at 6/4/18 12:38 AM:
-----------------------------------------------------------------
Please Emily stop saying these methods are for OSGi, this is just not true, technically
you have at least 2 trivial alternatives to not pollute the spec with unsafe methods and
still work in OSGi (once again geronimo did it for years so you can check not that far
;)). Maybe openliberty got lazy and used that but iit is an openliberty implementation
leak in specs which is a very big concern if true.
Concretely this method is a user method (since it is in the spec and whatever any javadoc
could state) and is not thread safe and worse, it just doesnt work in general if the user,
a framework or a 2nd container calls it after a first one.
was (Author: rmannibucau):
Please Emily stop saying these methods are for OSGi, this is just not true, technically
you have at least 2 trivial alternatives to not pollute the spec with unsafe methods and
still work in OSGi (once again geronimo and was did it for years so you can xheck not that
far ;)). Maybe openliberty got lazy and used that bit it is an openliberty implementation
leak in specs which is a very big concern if true.
Concretely this method is a user method (since it is in the spec and whatever any javadoc
could state) and is not thread safe and worse, it just doesnt work in general if the user,
a framework or a 2nd container calls it after a first one.
Deprecate before dropping CDI.setCDIProvider
--------------------------------------------
Key: CDI-726
URL:
https://issues.jboss.org/browse/CDI-726
Project: CDI Specification Issues
Issue Type: Feature Request
Components: Java SE Integration
Affects Versions: 2.0 .Final
Reporter: Romain Manni-Bucau
Priority: Blocker
CDI.setCDIProvider allows to switch the cdi provider at *any* time by *anyone*. This lead
to issues integrating multiple libraries doing it + is not a real user facing API, it is
actually a server internal.
Proposal is to deprecate the method, remove its implementation (always throw an
IllegalStateException or just do a noop) and finally drop the method after one or two
releases since it can't really be used except for very simple apps.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)