1 22 package org.jboss.test.invokers.ejb; 23 24 import java.rmi.RemoteException ; 25 import java.util.Vector ; 26 import java.util.Collection ; 27 28 import java.sql.*; 29 30 import javax.naming.*; 31 import javax.ejb.*; 32 33 37 public class SimpleBMPBean 38 implements EntityBean 39 { 40 EntityContext ctx = null; 41 42 Integer id; 44 String name; 45 46 public Integer ejbCreate (int _id, String _name) 47 throws CreateException, RemoteException 48 { 49 id = new Integer (_id); 50 name = _name; 51 return id; 52 } 53 54 public void ejbPostCreate (int _id, String _name) 55 throws CreateException, RemoteException 56 { 57 } 58 59 public void ejbLoad () 60 { 61 } 62 63 public void ejbStore () 64 { 65 } 66 67 public void ejbRemove () 68 { 69 } 70 71 72 public Integer ejbFindByPrimaryKey (Integer _key) throws FinderException 73 { 74 return _key; 75 } 76 77 public void ejbActivate () 78 { 79 } 80 81 public void ejbPassivate () 82 { 83 } 84 85 public void setEntityContext (EntityContext _ctx) 86 { 87 ctx = _ctx; 88 } 89 90 public void unsetEntityContext () 91 { 92 ctx = null; 93 } 94 95 97 public void setName (String _name) 98 { 99 name = _name; 100 } 101 102 public String getName () 103 { 104 return name; 105 } 106 107 108 } 109 | Popular Tags |