Package org.apache.catalina.tribes

Examples of org.apache.catalina.tribes.ManagedChannel.start()


        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) {
            Thread.sleep(5000);//allow everything to shutdown
View Full Code Here


        ManagedChannel channel = (ManagedChannel) ChannelCreator.createChannel(args);
        String mapName = "MapDemo";
        if ( args.length > 0 && (!args[args.length-1].startsWith("-"))) {
            mapName = args[args.length-1];
        }
        channel.start(channel.DEFAULT);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        MapDemo demo = new MapDemo(channel,mapName);
       
        System.out.println("System test complete, time to start="+(System.currentTimeMillis()-start)+" ms. Sleeping to let threads finish.");
        Thread.sleep(60 * 1000 * 60);
 
View Full Code Here

        String mapName = "MapDemo";
        if ( args.length > 0 && (!args[args.length-1].startsWith("-"))) {
            mapName = args[args.length-1];
        }
        //start the channel
        channel.start(Channel.DEFAULT);
        //listen for shutdown
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        //create a map demo object
        new MapDemo(channel,mapName);
View Full Code Here

        LoadMessage msg = new LoadMessage();
       
        messageSize = LoadMessage.getMessageSize(msg);
        channel.setChannelListener(test);
        channel.setMembershipListener(test);
        channel.start(channel.DEFAULT);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        while ( threads > 1 ) {
            Thread t = new Thread(test);
            t.setDaemon(true);
            t.start();
View Full Code Here

        LoadMessage msg = new LoadMessage();
       
        messageSize = LoadMessage.getMessageSize(msg);
        channel.addChannelListener(test);
        channel.addMembershipListener(test);
        channel.start(startoptions);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        while ( threads > 1 ) {
            Thread t = new Thread(test);
            t.setDaemon(true);
            t.start();
View Full Code Here

        ManagedChannel channel = (ManagedChannel) ChannelCreator.createChannel(args);
        String mapName = "MapDemo";
        if ( args.length > 0 && (!args[args.length-1].startsWith("-"))) {
            mapName = args[args.length-1];
        }
        channel.start(channel.DEFAULT);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        MapDemo demo = new MapDemo(channel,mapName);
       
        System.out.println("System test complete, time to start="+(System.currentTimeMillis()-start)+" ms. Sleeping to let threads finish.");
        Thread.sleep(60 * 1000 * 60);
 
View Full Code Here

        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) {
            Thread.sleep(5000);//allow everything to shutdown
View Full Code Here

            }
   
   
            ManagedChannel channel = (ManagedChannel)ChannelCreator.createChannel(args);
            EchoRpcTest test = new EchoRpcTest(channel,name,count,message,pause,options,timeout);
            channel.start(channel.DEFAULT);
            Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
            test.run();
   
            System.out.println("System test complete, sleeping to let threads finish.");
            Thread.sleep(60*1000*60);
 
View Full Code Here

        LoadMessage msg = new LoadMessage();
       
        messageSize = LoadMessage.getMessageSize(msg);
        channel.addChannelListener(test);
        channel.addMembershipListener(test);
        channel.start(channel.DEFAULT);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        while ( threads > 1 ) {
            Thread t = new Thread(test);
            t.setDaemon(true);
            t.start();
View Full Code Here

        ManagedChannel channel = (ManagedChannel) ChannelCreator.createChannel(args);
        String mapName = "MapDemo";
        if ( args.length > 0 && (!args[args.length-1].startsWith("-"))) {
            mapName = args[args.length-1];
        }
        channel.start(channel.DEFAULT);
        Runtime.getRuntime().addShutdownHook(new Shutdown(channel));
        MapDemo demo = new MapDemo(channel,mapName);
       
        System.out.println("System test complete, sleeping to let threads finish.");
        Thread.sleep(60 * 1000 * 60);
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.