1 25 26 package org.objectweb.jonas.jtests.beans.inherit; 28 29 import javax.ejb.CreateException ; 30 import javax.ejb.EntityBean ; 31 import javax.ejb.EntityContext ; 32 import javax.ejb.RemoveException ; 33 34 import org.objectweb.jonas.common.Log; 35 import org.objectweb.util.monolog.api.Logger; 36 import org.objectweb.util.monolog.api.BasicLevel; 37 38 public class UserEC extends UserImpl implements EntityBean { 39 40 static protected Logger logger = null; 41 42 protected EntityContext entityContext; 43 44 public IdPK ejbCreate(int val_id, String val_name) throws CreateException { 45 46 logger.log(BasicLevel.DEBUG, "UserEC.ejbCreate(int " + val_id + " ,String " + val_name + ")"); 47 48 id = val_id; 51 name = val_name; 52 age = 0; 53 password = "bidon"; 54 55 return (null); 56 } 57 58 public void ejbPostCreate(int val_id, String val_name) { 59 } 60 61 public void ejbActivate() { 62 } 63 64 public void ejbPassivate() { 65 } 66 67 public void ejbLoad() { 68 69 } 70 71 public void ejbStore() { 72 } 73 74 public void ejbRemove() throws RemoveException { 75 } 76 77 public void setEntityContext(EntityContext ctx) { 78 if (logger == null) { 79 logger = Log.getLogger("org.objectweb.jonas_tests"); 80 } 81 logger.log(BasicLevel.DEBUG, ""); 82 entityContext = ctx; 83 } 84 85 public void unsetEntityContext() { 86 } 87 88 public String getData() { 90 return "UserEC.getData"; 91 } 92 93 public int methBug301113(int p) { 95 return p; 96 } 97 98 } 99 | Popular Tags |