KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > samples > ejb > SimpleBeanEJB


1 package samples.ejb;
2
3 import javax.ejb.*;
4
5 public class SimpleBeanEJB implements SessionBean {
6     
7     public void ejbCreate() {
8     }
9
10     public void ejbActivate() {}
11     public void ejbPassivate() {}
12     public void ejbRemove() {}
13     public void setSessionContext(SessionContext sc) {}
14
15     // "Business" Methods:
16
public String JavaDoc sayHello(String JavaDoc name) {
17         return ( "Hello " + name + ", have a nice day.");
18     }
19
20     public String JavaDoc sayGoodbye(String JavaDoc name) {
21         return ( "See ya, then " + name);
22     }
23
24 }
25
Popular Tags