1 22 package org.jboss.test.cmp2.fkstackoverflow.ejb; 23 24 import org.jboss.logging.Logger; 25 26 import javax.ejb.SessionBean ; 27 import javax.ejb.SessionContext ; 28 import javax.ejb.CreateException ; 29 import javax.ejb.EJBException ; 30 31 32 41 public class FacadeSessionBean 42 implements SessionBean 43 { 44 private static Logger log = Logger.getLogger(FacadeSessionBean.class); 45 46 48 51 public void testSimple() 52 { 53 try 54 { 55 ChildLocalHome ch = ChildUtil.getLocalHome(); 56 ChildLocal child = ch.create(new Long (1), "Avoka", new Long (1)); 57 child.setSimpleParentId(new Long (2)); 58 } 59 catch(Exception e) 60 { 61 throw new EJBException (e); 62 } 63 } 64 65 68 public void testComplex() 69 { 70 try 71 { 72 ChildLocalHome ch = ChildUtil.getLocalHome(); 73 ChildLocal child = ch.create(new Long (10), "Avoka", new Long (10)); 74 child.setComplexParentId1(new Long (2)); 75 child.setComplexParentId2(new Long (3)); 76 } 77 catch(Exception e) 78 { 79 throw new EJBException (e); 80 } 81 } 82 83 85 89 public void ejbCreate() throws CreateException {} 90 public void ejbActivate() {} 91 public void ejbPassivate() {} 92 public void ejbRemove() {} 93 94 public void setSessionContext(SessionContext ctx) {} 95 } 96 | Popular Tags |