• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to throw RemoteException?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a interface DataInterface to extend the interface DBAccess.
public interface DataInterface extends DBAccess, Remote {
public interface DBAccess{
public String [] readRecord(long recNo) throws RecordNotFoundException;
public void updateRecord(long recNo, String[] data, long lockCookie) throws RecordNotFoundException, SecurityException, RemoteException;
public void deleteRecord(long recNo, long lockCookie) throws RecordNotFoundException, SecurityException, RemoteException;
public long[] findByCriteria(String[] criteria) throws RemoteException;
public long createRecord(String [] data) throws DuplicateKeyException, RemoteException;
public long lockRecord(long recNo) throws RecordNotFoundException, RemoteException;
public void unlock(long recNo, long cookie) throws SecurityException, RemoteException;
}
But they say the interface DBAccess doesn't throws RemoteException? How to deal with this? If I don't extends the DBAccess? how to relize the method to get the columna name of the DB?
Is somebody have good idea?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Because in interface DBAccess, findByCriteria(String[] criteria) doesn't throw RemoteException, so your DataInterface implementation should not implement a method with signature like this.
So I suggest you copy some signatures from DBAccess to your DataInterface ,and just let DataInterface extends Remote
 
Wu Ming
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NX: NOTE: this is new assignment about URLBird

Originally posted by Jonathan Liu:
Because in interface DBAccess, findByCriteria(String[] criteria) doesn't throw RemoteException, so your DataInterface implementation should not implement a method with signature like this.
So I suggest you copy some signatures from DBAccess to your DataInterface ,and just let DataInterface extends Remote


Yes, I see. If do as you say, Nothing will happen. But how to deal with the interface of DBAccess required by the assignment? Just Let it be? It will fail to fit the requirement of 'must'
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic