
EJB
™
Development Using Borland
®
JBuilder
®
8 and BEA WebLogic Server
™
7.0
28
ex.printStackTrace();
}catch (Exception ex){
ex.printStackTrace();
}
return empName;
}
Note: The getEmpName(Short) method looks up for the entity bean Employee, creates a
remote handle, and calls the methods getFirstName()and getLastName()of Employee entity
bean.
Assign entity bean reference to session bean
Since the session bean EmployeeSes is calling the entity bean Employee, an entity bean
reference needs to be stored in deployment descriptor. The deployment descriptor tool of
JBuilder can be used to create a reference visually.
Double-click EmployeeSes under EJBModule TestEntMod from JBuilder project tree and
click EJB Local References tab at the bottom of the editor pane.
Click Add and enter the name as ejb/Employee in EJB Local Reference window. Click OK.
Click the checkbox Islink. The other columns Link, Local Home, and Local should be
populated automatically. Just to make sure that the values of the following columns are as
follows:
Link: Employee
Type: Entity
Local home: com.borland.demo.ejb.EmployeeHome
Local : com.borland.demo.ejb.Employee
See Figure 17 for details.
Kommentare zu diesen Handbüchern