In my explainDocument for SCJD: The data access class must implement the following interface:
This interface is implemented by my remote data access class which is "DatabaseImpl.java". DatabaseImpl class implement java.rmi.Remote class,too. So,these methods must throw the java.rmi.RemoteException for implement remote access. Since these methods extend the DBMain interface,so may not throw the java.rmi.RemoteException? Q:How do I do for the remote access?
Hi Xi, It will not work: public class DataAdapter implement DBMain. DataAdapter must implement another interface, whose method signatures throw either RemoteException or its parent Exceptions. This interface you should define yourself. But the idea is correct... Regards, Vlad
Q:AnotherDBMain-interface's structure must the same as DBMain-interface's structure.Is it?
Not necessarily. For the older Fly By Night Services assignment, you did have to provide networked versions of all the methods of the Data class. However there is no such requirement for the new assignments. Some people here are only providing business methods over the network interface. Others are providing equivalent methods to all the methods detailed in the provided interface. I believe you may choose for yourself which you wish to do. The advantage of your interface having the same methods as the provided interface is that you will be writing a generic database server. You will be able to use this with any database. Not just with Hotels or Contractors (whichever you have). The advantage of only having business methods exposed to the clients is that you can save yourself some effort. Personally I think that you should consider writing your interface so that it has the same methods as the provided interface. It is more extensible for the future, and it is more challenging. Regards, Andrew
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com