1> How to add RemoteException in throws clause of remote interface...
To declare the RemoteException in remote interface implementation of readRecord , I have to change the DBAccess interface readRecord method signature or adopt some pattern to decorate this ...If i don't declare throws RemoteException then it throws IllegalArgumentException at runtime.so how do i change the method signature in local interface so it can throw RemoteException ?? IF i add throws IOException in local method signature then it will work fine but it seems wrong and i will violate the contract... what other option can be here....
2> Dynamic Schema implementation is required or we can hard code the fields for its size and name.I have been wondering a lot about this question .Because if i implement the dynamic schema then also i have to declare primary key fields(which requires that you know the fields before). can ranchers share their view on implementing dynamic schema or not implementing...pros & cons..
Waiting for gurus to reply ...
SCJP 1.4<br />SCWCD 1.4(91%)<br />Working on SCJD -Bodgitt & Scrapper Constructions...<br /> <br />"It takes 43 muscles to frown & 17 to smile but it doen't take any to just sit there with a dumb look on your face .. Keep Smiling "
1) for the remote interface I have an adapter that "adapts" a remote object to a DB interface. The Remote Exceptions are catched in the adapter and application specific exception are thrown further. For example in the DB "delete" method RemoteException is catched, RecordNotFoundException is thrown instead to satisfy the contract of the DB interface.
2) Dynamic Schema implementation makes no sense from my point of view because you still need a place where you must use the fields that are given in the specification.
for 1> I am adding one more interface DBRemoteReference that mathces to DBAccess interface(provided by sun ) with additional IOException in throws clause of each method.My structure looks like the following
Am i implementing the Adapter pattern right ?? main concern is the bold part..Am i on the right path ??
2> for this i am thinking to get rid of dynamic schema and hard code the fields..what do you guys think about it ??