1 package samples.ejb; 2 3 import javax.ejb.*; 4 5 public class NiceThingsBeanEJB implements SessionBean { 6 7 public void ejbCreate() {} 8 9 public void ejbActivate() {} 10 public void ejbPassivate() {} 11 public void ejbRemove() {} 12 public void setSessionContext(SessionContext sc) {} 13 14 public String sayHello(String name) { 16 return ( "Hiya " + name + ", how are you?"); 17 18 } 19 20 public NiceThings findNiceThingsFor(String name) { 21 24 NiceThings niceThings = new NiceThings("cake", 25 23, 26 "black as night"); 27 return niceThings; 28 } 29 30 public boolean updateNiceThingsFor(String name, NiceThings niceThings) { 31 return true; 35 } 36 37 } 38 | Popular Tags |