Skip to content

Conversation

@overheadhunter
Copy link
Member

@PostConstruct LicenseHolder.init() is changed to a normal method LicenseHolder. ensureLicenseExists(), which is called during application start in the newly added Quarkus Main class:

@Override
public int run(String... args) throws Exception {
try {
license.ensureLicenseExists();
} catch (RuntimeException e) {
LOG.error("Failed to validate license, shutting down...", e);
return 1;
}
Quarkus.waitForExit();
return 0;
}

In other words: The application won't start without a license. But fear not, it is able to request a free license autonomously. In other words, if it is running, a license does exist, which reduces a lot of branching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants