()
| 39 | actx.setTimeout(30*1000); |
| 40 | Runnable run = new Runnable() { |
| 41 | @Override |
| 42 | public void run() { |
| 43 | try { |
| 44 | String path = "/jsp/async/async1.jsp"; |
| 45 | Thread.currentThread().setName("Async1-Thread"); |
| 46 | log.info("Putting AsyncThread to sleep"); |
| 47 | Thread.sleep(2*1000); |
| 48 | log.info("Dispatching to "+path); |
| 49 | actx.dispatch(path); |
| 50 | }catch (InterruptedException | IllegalStateException x) { |
| 51 | log.error("Async1",x); |
| 52 | } |
| 53 | } |
| 54 | }; |
| 55 | Thread t = new Thread(run); |
| 56 | t.start(); |