|
47 | 47 | import org.xwiki.bridge.event.DocumentDeletedEvent; |
48 | 48 | import org.xwiki.bridge.event.DocumentUpdatedEvent; |
49 | 49 | import org.xwiki.bridge.event.WikiDeletedEvent; |
50 | | -import org.xwiki.classloader.NamespaceURLClassLoader; |
51 | | -import org.xwiki.classloader.internal.ClassLoaderResetedEvent; |
| 50 | +import org.xwiki.classloader.internal.ClassLoaderResetEvent; |
52 | 51 | import org.xwiki.configuration.ConfigurationSource; |
53 | 52 | import org.xwiki.context.concurrent.ExecutionContextRunnable; |
54 | 53 | import org.xwiki.model.reference.DocumentReference; |
@@ -109,7 +108,7 @@ public class SchedulerPlugin extends XWikiDefaultPlugin implements EventListener |
109 | 108 | new DocumentDeletedEvent(), |
110 | 109 | new DocumentUpdatedEvent(), |
111 | 110 | new WikiDeletedEvent(), |
112 | | - new ClassLoaderResetedEvent() |
| 111 | + new ClassLoaderResetEvent() |
113 | 112 | ); |
114 | 113 |
|
115 | 114 | /** |
@@ -748,9 +747,9 @@ public void onEvent(Event event, Object source, Object data) |
748 | 747 | } catch (SchedulerException e) { |
749 | 748 | LOGGER.error("Failed to remove schedulers for wiki [{}]", wikiId, e); |
750 | 749 | } |
751 | | - this.schedulersClassLoaderManager.removeSchedulers(wikiId); |
752 | | - } else if (event instanceof ClassLoaderResetedEvent classLoaderResetedEvent) { |
753 | | - String namespace = (String) source; |
| 750 | + this.schedulersClassLoaderManager.removeSchedulers(String.format("wiki:%s", wikiId)); |
| 751 | + } else if (event instanceof ClassLoaderResetEvent classLoaderResetEvent) { |
| 752 | + String namespace = classLoaderResetEvent.getNamespace(); |
754 | 753 | this.schedulersClassLoaderManager.onClassLoaderReset(namespace); |
755 | 754 | } else { |
756 | 755 | onDocumentEvent(source, data); |
|
0 commit comments