The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

tboemker@elynx.com (7) [Avatar] Offline
#1
In Figure 8.17 of Section 8.4.2 (Protecting against dangling services), the book shows a proxy in Bundle A and implies that the strong reference from Bundle B to the proxy will keep the proxy from being garbage collected but allow the other classes of Bundle A to be collected.

Isn't the proxy defined by the same ClassLoader as the other classes of Bundle A? Wouldn't the reference to the proxy keep reachable not only the proxy but also its Class, its ClassLoader, and all the other classes loaded by that ClassLoader--that is, all of the classes of Bundle A?