Java Reference
In-Depth Information
Figure 4-4. Class diagram: remote business interface
In the case of the remote SLSB, the business interface methods must declare a throws
clause for RemoteException . Otherwise, the EJB verifier tool that comes with each applica-
tion server will not allow the deployment of such EJBs. The business interface for the
SLSB should ideally be the interface associated with the application service. However,
because of this dependency with RemoteException , I will create a separate interface as
shown in Listing 4-25.
Listing 4-25. UnderwritingBusinessService.java
public interface UnderwritingBusinessService {
public void underwriteNewPolicy(String productCd,String name,int age)
throws RemoteException;
}
The remote interface now extends the UnderwritingBusinessService and no longer
defines any business methods. It is shown in Listing 4-26.
Listing 4-26. UnderwritingRemote
public interface UnderwritingRemote extends EJBObject, UnderwritingBusinessService {
}
Search WWH ::




Custom Search