/* this is the application layer */ public class AppC2 { public AppC2() { // Thread t=new Thread(new comm(1,1200,0,0)); /* initialise the lower comm layer */ // t.start(); /* start the thread of comm */ /* receiveMulticast()is initialised */ } public static void main(String args[]) { try { DataAC dac=new DataAC(); DataCA dca=new DataCA(); comm t = new comm(2,1206,0,0,dac,dca); /* initialise the lower comm layer */ /* receiveMulticast()is initialised */ AppC1 a = new AppC1(); CoreMessage cm=new CoreMessage(92,"select * from emp_table",1); /* create a message */ for (int i=1;i<=10;i++) { Thread.sleep(2000); // DataComm_app.addApp_comm(cm); // send a message App-->Comm System.out.println("producing "+ i); dac.Produce(cm);} } catch(Exception r) { System.out.println("AppC1" + r); } } }