1 | Context initialContext = new InitialContext(); |
2 | StudentHome stHome = (StudentHome) javax.rmi.PortableRemoteObject.narrow( |
3 | initialContext.lookup("myejbs/school/studentHome", StudentHome.class); |
4 | public interface StudentHome extends javax.ejb.EJBHome { |
5 | Student create(String stName, String stId) throws RemoteException, BadStudentIdException, CreateException; |
6 | } |
7 | Student astudent = stHome.create("alex","3142"); |