File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Help With Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Help With Interface" Watch "Help With Interface" New topic

Help With Interface

Ulises Pulido
Ranch Hand

Joined: Jul 24, 2008
Posts: 81
Hello Guys:

I created an interface that works as a Facade in order to perform the operations over Data easily.

This interface has the basic functions required for the GUI. The issue is that this interface extends the Remote Interface and I am doing that both (The remote object and local object) implements this interface.

So the thing is that when I perform local operations or remote operations I need to catch the RemoteException anyway even when the operations are done in a local environment. Does this goes against the specification? I mean the local operations perform only local operations not doing any networking and the remote uses networking but for both a RemoteException is needed to be handled does this would affect the grade ?

Why I did this ? because doing it I would need to do the operations only in one GUI and I would not need to create two. (Kind of Strategy).

I hope you can help me giving me comments about this.

SCJP 5.0, SCWCD 5.0, SCBCD 5.0, SCJD, SCEA in progress
satishkumar janakiraman
Ranch Hand

Joined: May 03, 2004
Posts: 334
There is no meaning of throwing RemoteException in the local mode. RemoteException indicates the connection problem if there is any while connecting to the server. But in local mode, there is no need to throw RemoteException. I would suggest you to consider alternative solution

Fola Fadairo
Ranch Hand

Joined: Feb 16, 2004
Posts: 35
Try throwing IOException instead...
I agree. Here's the link:
subject: Help With Interface
It's not a secret anymore!