hi dear all,
I want to build a session bean, which have remote/local interface and they all extends from a common business interface. I find it is impossible. because methods declare in remote interface is forced to throws a remoteException, while in local interface not.
So how to define the methods in business interface which can cater for the two interface, remote/local?
thanks in advance!
actually you cannot have a interface implemented dirrectly by both the Local interface and the Remote interface. The Business Interface pattern treats these two cases separately. So if you want to use the Remote interface you make a business interface with each method throwing remote exceptions and if you want to use the Local interface you make a business interface in which no method throws remote exception.
You can see in more detail this pattern in Floyd Marinescu's book, "EJB Design Patterns".