use of org.apache.catalina.tribes.ManagedChannel in project tomcat by apache.
the class MembersWithProperties method main.
@SuppressWarnings("unused")
public static void main(String[] args) throws Exception {
if (args.length == 0)
usage();
main = Thread.currentThread();
ManagedChannel channel = (ManagedChannel) ChannelCreator.createChannel(args);
Properties props = new Properties();
props.setProperty("mydomainkey", "mydomainvalue");
props.setProperty("someotherkey", Arrays.toString(UUIDGenerator.randomUUID(true)));
new MembersWithProperties(channel, props);
channel.start(Channel.DEFAULT);
Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
try {
Thread.sleep(Long.MAX_VALUE);
} catch (InterruptedException ix) {
//allow everything to shutdown
Thread.sleep(5000);
}
}
Aggregations