/* this is the application layer */ public class AppS1 { private int count; public AppS1() { this.count = 1; } public static void main(String args[]) { DataAC dac=new DataAC(); DataCA dca=new DataCA(); int id=Integer.parseInt(args[0]); System.out.println(id+" "+(1200+id*2)); comm t=new comm(id,1200+id*2,0,1,dac,dca); AppS1 a = new AppS1(); while(true) { try { Thread.sleep(2000); Message m = (Message)dca.Consume(); Debug.dump(m," " ); System.out.println(" Query : " + (a.count++)); } catch(Exception e) { System.out.println("AppS : " + e); } } } // CoreMessage cm=new CoreMessage(92,"select * from emp_table",1); /* create a message */ // DataComm_app.addApp_comm(cm); /* send a message App-->Comm */ }