April 2003
Intermediate to advanced
750 pages
16h 53m
English
For an introduction to the home methods, see “EJB home methods” on page 24. Creating a home method is very simple. It does not make any difference whether the entity bean is container-managed or bean-managed.
There are no wizards or windows to create a home method. We have to code the method in the bean class and promote it to the home interface.
We create a home method called ejbHomeGetAllCustomers in the CustomerBean class. This method returns an array of strings with each element containing a customer name and the account numbers. This home method uses the two ejbSelect methods we created earlier.
public String[] ejbHomeGetAllCustomers() throws javax.ejb.FinderException { Object[] objects = ejbSelectAllCustomerNames().toArray(); ...Read now
Unlock full access