posted 18 years ago
I haven't thought this through, but I can see the BD needing to obtain and return a business service to the client in order to invoke business methods. This business service will typically be any of the following:
1. A reference to a JavaBean running in the same JVM.
2. A stub to an EJBObject for an EJB application running in a different JVM.
3. A stub to a javax.xml.rpc.Service for a web service endpoint running in a different JVM.
It should be easy enough to do this via some sort of service locator, using a configuration variable read in on server startup.
Also, there is no reason at all for the client to ever receive RemoteException, the BD should catch this sort of exception, wrap and rethrow it as RuntimeException (or some suitable subclass thereof). The client will therefore only receive a system exception and, of course, any application exceptions.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3