1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.ejb2view; 26 27 import java.rmi.RemoteException ; 28 29 import javax.ejb.CreateException ; 30 31 37 public class SimpleEjb2BeanBase { 38 39 42 private int intCode; 43 44 47 private String strName; 48 49 54 public void ejbCreate() throws CreateException , RemoteException { 55 this.intCode = SimpleEjb2.DEFAULT_CODE_REMOTE; 56 this.strName = SimpleEjb2.DEFAULT_NAME_REMOTE; 57 } 58 59 66 public void init(final int code, final String name) throws CreateException , RemoteException { 67 this.intCode = code; 68 this.strName = name; 69 } 70 71 77 void ejbCreate(final int code) throws CreateException { 78 this.intCode = code; 79 this.strName = SimpleEjb2Local.DEFAULT_NAME_LOCAL; 80 } 81 82 88 void init(final String name) throws CreateException { 89 this.intCode = SimpleEjb2Local.DEFAULT_CODE_LOCAL; 90 this.strName = name; 91 } 92 93 99 public String sayHello(final String message) throws RemoteException { 100 return message; 101 } 102 103 108 public int getCode() throws RemoteException { 109 return intCode; 110 } 111 112 117 public void setCode(final int intCode) throws RemoteException { 118 this.intCode = intCode; 119 } 120 121 126 public String getName() throws RemoteException { 127 return strName; 128 } 129 130 135 public void setName(final String strName) throws RemoteException { 136 this.strName = strName; 137 } 138 139 144 void setValues(final int code, final String name) { 145 this.intCode = code; 146 this.strName = name; 147 } 148 149 153 String sayHello() { 154 return SimpleEjb2Local.DEFAULT_MESSAGE; 155 } 156 157 161 int getCodeLocal(){ 162 return intCode; 163 } 164 165 169 String getNameLocal(){ 170 return strName; 171 } 172 173 } 174 | Popular Tags |