Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
Has anyone else done anything similar?
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt:
Checkout if you really, really need RemoteException. It is derived from a more much more common exception type. And that type can therefore be used in an interface suitable for both local and remote use. I believe the API was changed to enable of such generic interfaces.
If you hve the O'Reilly RMI book, there is lots of very useful info to be found.
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.
Originally posted by Ta Ri Ki Sun
for remote connection I have RemoteDataFacade extending Remote and DataFacade, and RemoteDataAdapter extending UnicastRemoteObject and implementing RemoteDataFacade,
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Surely we should not show locking functionality to client.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
try {
long lockCookie = lockRecord(recordNo);
updateRecord(...)/deleteRecord(...);
unlock(lockCookie);
} catch (SomeCustomException ex) {
...
}
Originally posted by shan chen:
Is DataFacade the same as DBMain from SUN? Could you give an example of a method signature in DataFacade?
Assume there is a method find() in DataFacade. It should throws IOException in order to allow the same method in RemoteDataAdapter to throw RemoteException. Otherwise RemoteDataAdapter will not comply. But the origianl interface DBMain does not have IOException.
Originally posted by Ta Ri Ki Sun:
no Shan, DBMain is implemented by Data which does all the dog work, and DataFacade has methods like Map findRooms(String[] criteria) throws Exception; , void bookRoom(int recNo, String owner) throws Exception; , these methods use several Data methods to get the job done,
Originally posted by Vitaly Zhuravlyov:
Hi Ta Ri Ki Sun,
Do you correctly use the word "Facade"? Facade for what? It seems to me that you do not use the Facade pattern. Correct me if I'm wrong.
Vitaly
, so I guess it is a different pattern, and although it works very well I'll have to research it some more after work today and refactor those classes where needed, thanks for raising it* It does not prevent clients from accessing the underlying classes.
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
Originally posted by Marius Snyman:
What is this Max book. URL please.
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|