21222324252627
// simulating a long running query Thread.sleep(AWAIT); } catch (InterruptedException ex) { Logger.getLogger(MyAsyncBeanMethodLevel.class.getName()).log(Level.SEVERE, null, ex); } return new AsyncResult(n1 + n2); }
// simulating a long running query Thread.sleep(AWAIT); } catch (InterruptedException ex) { Logger.getLogger(MyAsyncBeanClassLevel.class.getName()).log(Level.SEVERE, null, ex); } return new AsyncResult(n1 + n2); }