1 15 16 package org.objectweb.jac.aspects.distribution.bootstrap; 17 18 import org.objectweb.jac.core.*; 19 import org.objectweb.jac.core.dist.*; 20 import org.objectweb.jac.aspects.distribution.consistency.*; 21 22 24 25 public class BindClient { 26 27 30 31 public static void main( String [] args ) throws Throwable { 32 33 System.out.println( 34 "--- Binding to the distributed namespace and aspect-space ---" ); 35 System.out.println( 36 "--- Topology is " + Topology.get() + " ---" ); 37 38 39 Topology.get().addContainer ( RemoteContainer.resolve ( "s0" ) ); 40 ((ACManager)ACManager.get()).registering = true; 41 Consistency.bindToDistObj( "JAC_ac_manager", (Wrappee) ACManager.get() ); 42 Consistency.bindToDistObj( "JAC_topology", (Wrappee) Topology.get() ); 43 Consistency.bindToDistObj( "JAC_application_repository", 44 (Wrappee) ApplicationRepository.get() ); 45 Topology.get().addContainer ( RemoteContainer.resolve ( args[0] ) ); 46 ((ACManager)ACManager.get()).registering = false; 47 48 System.out.println( 49 "--- End of binding ---" ); 50 System.out.println( 51 "--- New topology is " + Topology.get() + " ---" ); 52 53 } 54 55 } 56 57 58 59 60 61 | Popular Tags |