This is a bundle activator which is responsible for configuring Weld bundle
to be used in GlassFish. As part of configuration, it configures the the
SingletonProvider in Weld. It sets different SingletonProvider for different
profiles. e.g., in WebProfile, it sets
TCCLSingletonProvider
, where as
for full-javaee profile, it uses
ACLSingletonProvider
. It tests profile by testing
existence of
EarClassLoader
.
Since Weld 1.1, an implementation of the
ProxyServices
SPI is used to provide
a classloader to load javassist defined proxies. This classloader ensures
that they can load not only application defined classes but also classes
exported by any OSGi bundle as long as the operation is happening in
the context of a Java EE app.
The bundle activator resets the SingletonProvicer in stop().