KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jfox > test > ejb3 > stateless > CalculatorBean


1 /*
2  * JFox - The most lightweight Java EE Application Server!
3  * more details please visit http://www.huihoo.org/jfox or http://www.jfox.org.cn.
4  *
5  * JFox is licenced and re-distributable under GNU LGPL.
6  */

7 package jfox.test.ejb3.stateless;
8
9 import javax.ejb.Local JavaDoc;
10 import javax.ejb.Remote JavaDoc;
11 import javax.ejb.Stateless JavaDoc;
12
13 /**
14  * Calculator EJB Bean
15  */

16 @Stateless JavaDoc(name = "stateless.CalculatorBean")
17 @Remote JavaDoc
18 @Local JavaDoc
19 public class CalculatorBean implements Calculator {
20
21     public int add(int x, int y) {
22         return x + y;
23     }
24
25     public int subtract(int x, int y) {
26         return x - y;
27     }
28
29 }
30
Popular Tags