1 package demo.ami; 2 3 public class AsyncServerImpl extends AsyncServerPOA 4 { 5 public int operation (int a, int b) 6 { 7 try 8 { 9 Thread.currentThread().sleep( 2000 ); 10 } 11 catch (InterruptedException e) 12 { 13 } 14 return a + b; 15 } 16 17 public int op2 (int a) throws demo.ami.MyException 18 { 19 try 20 { 21 Thread.currentThread().sleep( 2000 ); 22 } 23 catch (InterruptedException e) 24 { 25 } 26 throw new MyException ("Hello exceptional world"); 27 } 28 } 29 30 | Popular Tags |