THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Scrollbar |
---|
...
Registry Startup
It is possible to provide extra logic to be executed at Registry startup, by making contributions to the RegistryStartup service configuration.
...
Here's an example of a module that makes a contribution:
Code Block | ||||
---|---|---|---|---|
| ||||
public class MyModule
{
public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration)
{
configuration.add("MyContributionName", new Runnable() { ... });
}
} |
Generally, these contributions are in the form of inner classes; if they were services, they could just be eagerly loaded.
Startup Methods
Since | ||
---|---|---|
| ||
Code Block | ||||
---|---|---|---|---|
| ||||
public class MyModule
{
@Startup
public static void initMyApplication(Logger logger, MyService service)
{
logger.info("Starting up...");
service.init();
}
}
| ||||
Wiki Markup |
Scrollbar |
---|