1 //The foo remote object server 2 import java.rmi.RemoteException; 3 import org.objectweb.carol.util.configuration.CarolConfiguration; 4 5 public class Server { 6 7 //The main method of this server 8 public static void main(String [] args) { 9 try { 10 //initialize carol 11 CarolConfiguration.init(); 12 13 FooRemoteInterface myFoo = new Foo(); 14 // the object is automatically 15 // exported on RMI IIOP 16 } catch (RemoteException e) { 17 //Foo construction problem 18 } 19 20 } 21 } 22