Originally posted by Rasika Chitnis:
Thanks Terry, for detailed reply.
Here is my how I have laid out my classes :
-DBInterface (all public methods of SUN supplied Data class)
-DBRemoteInterface (extends DBInterface and Remote)
-Data implements DBInterface
-DBServer implements DBRemoteInterface
-DataClient holds a reference to an object of type DBInterface;
As I read it, Sun does not require different constructors to support different network configurations, but (a) constructor(s) different from Data to support networked mode. And the stub no doubt has a constructor that's different from the Data one.
Originally posted by Terry McKee:
The key phrase in the above directions is that ..."although it will need different constructors to allow it to support the network configuration." Why would a stub class need to account for a different network configurations?
That would be a bit odd. But I suspect the "local interface" you're referring to is the root database interface that may be implemented by either a local or a remote database. The fact that its methods throw RemoteException is merely an expression of the fact that it may have Remote implementations. Note that an implementation (such as Data) or sub-interface does not have to have a "throws RemoteException" in its methods!
Originally posted by chr hessenbruch:
[...] it looks a bit odd that the local interface throws RemoteExceptions.
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!https://www.kickstarter.com/projects/paulwheaton/greenhouse-1