1 26 package org.objectweb.sampleCluster2.ejb; 27 28 import javax.ejb.CreateException ; 29 import javax.ejb.EntityContext ; 30 31 import org.objectweb.jonas.common.JProp; 32 33 37 public abstract class MyEntitySLR implements javax.ejb.EntityBean { 38 39 42 private String jonasInstanceName = "unknown"; 43 44 49 public Object ejbCreate(String number) throws CreateException { 50 51 jonasInstanceName = "unknown"; 52 53 try { 54 JProp jp = JProp.getInstance(); 55 jonasInstanceName = jp.getValue("jonas.name"); 56 } catch (Exception e) { 57 System.out.println("Error while creating ejb : " + e.getMessage()); 58 } 59 60 setNumber(number); 61 setJOnASName(jonasInstanceName); 62 63 return null; 64 } 65 66 70 public void ejbPostCreate(String number) { 71 } 72 73 76 public void ejbLoad() { 77 } 78 79 82 public void ejbStore() { 83 } 84 85 88 public void ejbActivate() { 89 } 90 91 94 public void ejbPassivate() { 95 } 96 97 100 public void ejbRemove() { 101 } 102 103 106 public void setEntityContext(EntityContext ec) { 107 } 108 109 112 public void unsetEntityContext() { 113 } 114 115 119 public abstract String getNumber(); 120 121 125 public abstract void setNumber(String number); 126 127 131 public abstract String getJOnASName(); 132 133 137 public abstract void setJOnASName(String name); 138 139 } | Popular Tags |