This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes UrlyBird RMI Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "UrlyBird RMI Interface" Watch "UrlyBird RMI Interface" New topic
Author

UrlyBird RMI Interface

sohrab khan
Greenhorn

Joined: Sep 10, 2007
Posts: 13
Hi,
I've went through Monkhouse's book several time. I want to create rmi interface similar to what andrew did. The DBMain interface has read method as following:



I want to create RMI interface like:



But I get the overridden method does not throw the RemoteException. Can anybody tell me how to go about creating the above? I read somewhere that I should wrap RemoteException inside the RecordNotFoundException, so I removed the "throws RemoteException" from the method's signature and did the following in the implementation class of RemoteDBMain:


To do the above I've to put RemoteException in the throws clause as well which again invalidate the method signature and I get the overriden method does not throw RemoteException error.

Please let me know how to go about creating the rmi interface. Should i just copy the DBMain interface into RemoteDBMain and include the "throws RemoteException" in each method? or is there a better way of doing it?

Any suggestions would be highly appreciated.

Thankyou.


Sohrab Khan SCJP, SCJD, OCPDBA, MCSE
3tons Web Directory | EggDir Directory
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Hey, partner!

Please take a look here. I think it will be helpful!


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UrlyBird RMI Interface
 
Similar Threads
DBMain method need throw RemoteException?
NX: Error overriding interface method.
RMI explination
DBMain database interface & RemoteException
NX:About DBMain interface