1 19 package mark.comps; 20 21 import mark.AddData; 22 23 import javax.ejb.SessionContext; 24 import javax.ejb.EJBException; 25 import java.rmi.RemoteException; 26 27 public class AddImpl 28 implements javax.ejb.SessionBean 29 { 30 public int add( int a, int b ) 31 { 32 return a + b; 33 } 34 35 public AddData addData( AddData a, AddData b ) 36 { 37 return new AddData( a.getA() + b.getA() ); 38 } 39 40 public AddData addDatas( AddData a[] ) 41 { 42 int r = 0; 43 for( int i=0; i<a.length; i++ ) 44 { 45 r = r + a[i].getA(); 46 } 47 return new AddData( r ); 48 } 49 50 51 public void mVOID() 52 { 53 } 54 55 public int mINT() 56 { 57 return (int)0; 58 } 59 60 public double mDOUBLE() 61 { 62 return (double)0.0; 63 } 64 65 public float mFLOAT() 66 { 67 return (float)0.0; 68 } 69 70 public long mLONG() 71 { 72 return (long)0; 73 } 74 75 public char mCHAR() 76 { 77 return (char)0; 78 } 79 80 public boolean mBOOLEAN() 81 { 82 return true; 83 } 84 85 public byte mBYTE() 86 { 87 return (byte)0; 88 } 89 90 public String mSTRING() 91 { 92 return "Hello"; 93 } 94 95 public void mEXCEPTION() throws Exception 96 { 97 98 } 99 100 public void mNONE() 101 { 102 103 } 104 105 public void mONE( int a ) 106 { 107 108 } 109 110 public void mTWO( int a, int b ) 111 { 112 113 } 114 115 public void setSessionContext(SessionContext sessionContext) throws EJBException, RemoteException 116 { 117 } 119 120 public void ejbRemove() throws EJBException, RemoteException 121 { 122 } 124 125 public void ejbActivate() throws EJBException, RemoteException 126 { 127 } 129 130 public void ejbPassivate() throws EJBException, RemoteException 131 { 132 } 134 } 135 | Popular Tags |