KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > example > entity > home > HomeBean


1 package example.entity.home;
2
3 import javax.ejb.*;
4
5 /**
6  * Implementation of the HomeBean.
7  */

8 public class HomeBean extends com.caucho.ejb.AbstractEntityBean {
9   /**
10    * Returns hello, world.
11    */

12   public String ejbHomeHello()
13   {
14     return "hello, world";
15   }
16   
17   /**
18    * Adds two numbers.
19    */

20   public int ejbHomeAdd(int a, int b)
21   {
22     return a + b;
23   }
24   
25   /**
26    * The primary key is just a dummy.
27    */

28   public String ejbFindByPrimaryKey(String key)
29     throws FinderException
30   {
31     throw new FinderException("not supported");
32   }
33 }
34
Popular Tags