This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to throw RemoteException?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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'
 
She'll be back. I'm just gonna wait here. With this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic