Rules for the remote home interface
...
Declare one or more home business methods
�Arguments and return types must be RMI-IIOP compatible
�You can have overloaded methods
�Each method must declare a RemoteException
�You can declare your own application exceptions, but they must NOT be runtime exceptions (they must be compiler-checked exceptions)
�Methods can have arbitrary names, as long as they don�t begin with �create�, �find�, or �remove�.
Rules for the remote component interface
...
Declare one or more business methods that throw a RemoteException
�Arguments and return types must be RMI-IIOP compatible (Serializable, primitive, Remote, or arrays or collections of any of those)
�You can have overloaded methods
�Each method must declare a RemoteException
�You can declare your own application exceptions, but they must NOT be runtime exceptions (they must be compiler-checked exceptions � subclasses of Exception, but not subclasses of RuntimeExcepton)
�Methods can have arbitrary names, as long as they don�t begin with �ejb�.
Circle the EJB-QL statement if it has a legal SELECT clause
SELECT OBJECT (m) FROM MovieSchema m
SELECT m.title FROM MovieSchema m
SELECT m from MovieSchema m
SELECT OBJECT (m.title) FROM MovieSchema m
Using an optional WHERE clause
In the bean class
public abstract Collection ejbSelectGetAllMovies () throws FinderException;
In the deployment descriptor
SELECT OBJECT (m) FROM MovieSchema m WHERE m.genre = ?1
(403) Method header;
Looks like the header got copied from the previous page. The header should be:
public abstract Collection findByGenre(String genre) throws FinderException;
Think about the following operations, and figure out which of the two client interfaces (component or home), is better suited for each operation.
1 make a new customer
2 change an existing customer's phone number
3 find all the customers in pleasantville
4 delete all customers previously declared 'inactive'
5 delete a specific customer
6 get the street address of a specific customer
Think about the following operations, and figure out which of the two client interfaces (component or home), is better suited for each operation.
1 make a new customer
2 change an existing customer's phone number
3 find all the customers in pleasantville
4 delete all customers previously declared 'inactive'
5 delete a specific customer
6 get the street address of a specific customer