1 |
torben |
648 |
package dk.thoerup.asyncsamples; |
2 |
|
|
|
3 |
|
|
import javax.ejb.Asynchronous; |
4 |
|
|
import javax.ejb.LocalBean; |
5 |
|
|
import javax.ejb.Stateless; |
6 |
|
|
|
7 |
|
|
/** |
8 |
torben |
668 |
* Session Bean implementation class AsyncEjb - please not that @Asynchronous requires the full jeee profile (it's not included in web profile) |
9 |
torben |
648 |
*/ |
10 |
|
|
@LocalBean |
11 |
torben |
668 |
@Stateless(name="Example", mappedName="ejb/SimpleBeanJNDI") |
12 |
torben |
648 |
public class AsyncEjb { |
13 |
|
|
|
14 |
|
|
/** |
15 |
|
|
* Default constructor. |
16 |
|
|
*/ |
17 |
|
|
public AsyncEjb() { |
18 |
|
|
// TODO Auto-generated constructor stub |
19 |
|
|
} |
20 |
|
|
|
21 |
|
|
@Asynchronous |
22 |
|
|
public void doWork() { |
23 |
|
|
DummyWork.doWork(); |
24 |
|
|
} |
25 |
|
|
|
26 |
|
|
} |