AAA-169: Advertise PaxWebServer as an OSGi service 75/69475/1
authorTom Pantelis <tompantelis@gmail.com>
Wed, 14 Mar 2018 02:59:26 +0000 (22:59 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Wed, 14 Mar 2018 02:59:26 +0000 (22:59 -0400)
commitcce28736c57fdc23eeaea82e83215a67a79fca64
tree08e3d31dc63288876136b6988be83fdd31431dad
parent9835a203b4cc46d4859771a561d5c3266975b5ab
AAA-169: Advertise PaxWebServer as an OSGi service

The Pax Web WebContainer implementation registers a ServiceFactory and
uses the class loader of the bundle that obtains the OSGi service
reference. When PaxWebServer is advertised as a service, it causes a
ClassNotFoundEx when initializing shiro b/c it uses the TCCL that is
set by Pax Web obtained from the PaxWebServer's bundle. To alleviate this,
we can advertise a WebServer ServiceFactory so it use the caller's
bundle to get the WebContainer service.

Change-Id: I591c340ccb0551a8138d07ec79443bc648218baf
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/web/env/OsgiWebInitializer.java [deleted file]
aaa-shiro/impl/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
web/impl-osgi/pom.xml
web/impl-osgi/src/main/java/org/opendaylight/aaa/web/osgi/PaxWebServer.java