01: package example;
02:
03: import javax.annotation.Resource;
04:
05: import javax.ejb.Stateless;
06: import javax.ejb.TransactionAttribute;
07: import static javax.ejb.TransactionAttributeType.SUPPORTS;
08:
09: import javax.webbeans.Named;
10:
11: /**
12: * Implementation of the Hello bean.
13: */
14: @Stateless
15: public class HelloBean implements Hello {
16: @Named("greeting")
17: private String _greeting;
18:
19: /**
20: * Returns a hello, world string.
21: */
22: @TransactionAttribute(SUPPORTS)
23: public String hello() {
24: return _greeting;
25: }
26: }
|