This may not be that important, but since I am here anyway. I think typically the pattern should be (taken from ExtensionAddHandler), i.e. you should reset the context classloader after you are done

                ClassLoader oldTccl = SecurityActions.setThreadContextClassLoader(extension.getClass());
                try {
                    //Do stuff
                    extension.initialize(extensionRegistry.getExtensionContext(module, !standalone && !slaveHC));
                } finally {
                    SecurityActions.setThreadContextClassLoader(oldTccl);
                }