Created
July 8, 2014 18:05
-
-
Save jeanouii/01862f4751bfe0db5206 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void observeAssemblerBeforeApplicationDestroyed(@Observes final AssemblerAfterApplicationCreated event) { | |
| final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); | |
| final AppContext appContext = containerSystem.getAppContext(event.getApp().appId); | |
| final List<WebContext> webContexts = appContext.getWebContexts(); | |
| for (WebContext webContext : webContexts) { | |
| final ClassLoader classLoader = webContext.getClassLoader(); | |
| final String id = webContext.getId(); | |
| TrackerService.get().registerClassloaderForAppId(id, classLoader); | |
| } | |
| } | |
| public void observeAssemblerBeforeApplicationDestroyed(@Observes final AssemblerBeforeApplicationDestroyed event) { | |
| final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); | |
| final AppContext appContext = containerSystem.getAppContext(event.getApp().appId); | |
| final List<WebContext> webContexts = appContext.getWebContexts(); | |
| for (WebContext webContext : webContexts) { | |
| final ClassLoader classLoader = webContext.getClassLoader(); | |
| TrackerService.get().unregisterClassloader(classLoader); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment