1 22 package org.jboss.test.testbyvalue.bean; 23 24 25 import java.rmi.*; 26 import javax.ejb.*; 27 import javax.naming.Context ; 28 import javax.sql.DataSource ; 29 import javax.naming.InitialContext ; 30 import java.sql.Connection ; 31 import org.jboss.test.testbean.interfaces.StatelessSession; 32 import org.jboss.test.testbean.interfaces.StatelessSessionHome; 33 import java.util.Collection ; 34 import java.util.Collections ; 35 import java.util.Vector ; 36 import java.util.Enumeration ; 37 38 public class ByValueEntityBean implements EntityBean { 39 private EntityContext entityContext; 40 public String name; 41 42 public String ejbCreate() throws RemoteException, CreateException { 43 44 name="nothing"; 45 return name; 46 47 48 } 49 public String ejbCreate(String name) throws RemoteException, CreateException { 50 this.name=name; 51 return name; 52 } 53 54 55 public String ejbFindByPrimaryKey(String name) throws RemoteException, FinderException { 56 return name; 57 } 58 59 60 public void ejbPostCreate() throws RemoteException, CreateException { 61 } 62 63 public void ejbPostCreate(String name) throws RemoteException, CreateException { 64 } 65 66 67 public void ejbActivate() throws RemoteException { 68 } 69 70 public void ejbLoad() throws RemoteException { 71 } 72 73 public void ejbPassivate() throws RemoteException { 74 } 75 76 public void ejbRemove() throws RemoteException, RemoveException { 77 } 78 79 public void ejbStore() throws RemoteException { 80 } 81 82 83 public void setEntityContext(EntityContext context) throws RemoteException { 84 entityContext = context; 85 } 86 87 public void unsetEntityContext() throws EJBException, RemoteException 88 { 89 this.entityContext=null; 90 } 91 92 public String getName() 93 { 94 return name; 95 } 96 97 public void setName(String name) 98 { 99 this.name=name; 100 } 101 102 public void doByValueTest(ClassWithProperty property) 103 { 104 property.setX(property.getX()+1000); 105 } 106 107 } 108 | Popular Tags |