This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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'
 
A sonic boom would certainly ruin a giant souffle. But this tiny ad would protect it:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic