1 17 18 package org.objectweb.jac.aspects.distribution.bootstrap; 19 20 import org.apache.log4j.Logger; 21 import org.objectweb.jac.aspects.distribution.consistency.*; 22 import org.objectweb.jac.core.*; 23 import org.objectweb.jac.core.dist.*; 24 import org.objectweb.jac.util.Log; 25 26 28 29 public class DistBootstrap { 30 static Logger logger = Logger.getLogger("dist"); 31 32 35 36 public static void main( String [] args ) throws Throwable { 37 logger.debug("bootstrapping the distributed system"); 38 39 Topology.get().bootstrapFlag = true; 40 logger.debug("local container is "+Distd.getLocalContainerName()); 41 Topology.get().addContainer(Distd.getLocalContainerName()); 42 43 logger.debug("topology is "+Topology.get()); 44 45 48 logger.debug("installing consistency protocols"); 49 50 ConsistencyWrapper.wrap((Wrappee)ApplicationRepository.get(), 51 StrongPushConsistencyWrapper.class, 52 null, 53 new String [] { "addApplication", 54 "extend", 55 "unextend" }, 56 null, 57 ".*"); 58 59 ConsistencyWrapper.wrap( 60 (Wrappee)Topology.get(), 61 StrongPushConsistencyWrapper.class, 62 null, 63 new String [] { "addContainer(org.objectweb.jac.core.dist.RemoteContainer)", 64 "removeContainer" }, 65 null, 66 ".*"); 67 68 Topology.get().bootstrapFlag = false; 69 logger.debug("end of bootstrap"); 70 } 71 72 } 73 | Popular Tags |