@Retention(value=RUNTIME) @Target(value=METHOD) public @interface AppMain
An application's main method is invoked by the server runtime after the application's has become the primary in the cluster. It is invoked asynchronously in a separate thread.
@AppHAPolicy(HAPolicy.StateReplication)
public class DQPerfDriverApp {
//...
@Configured(name="my.app.sendOnStartup", defaultValue="true")
private boolean sendOnStartup;
@AppMain
final public void main(final String args[]) throws Exception {
if (sendOnStartup) {
//Kick of a thread that sends some messages
doSend(sendCount, sendRate);
}
}
}
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.