Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 151069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:23:28+00:00 2026-05-11T09:23:28+00:00

I have to implement an RMI server which will be a front end for

  • 0

I have to implement an RMI server which will be a front end for two other RMI services. So I decided a logical thing to do would be to have the interface for this implement the interfaces for the other two services.

public interface FrontEndServer extends Remote, BookServer, StudentServer {     // Block empty so far } 

However there is a method on the StudentServer

/**  * Allows a student to borrow a book  *   * @param studentID of the student who wishes to borrow a book  * @param bookID of the book the student wishes to borrow  * @throws RemoteException  * @throws StudentNotFoundException when a student is not found in the system  */ void addBookToStudent(int studentID, int bookID) throws RemoteException, StudentNotFoundException; 

I would like the FrontEndServer to also throw a BookNotFoundException as this service will also validate if the book actually exists before attempting to add the details in.

Is this possible or is my design idea completely off and this is actually a bad design idea as if the other interfaces change and all? And will I be better of writing the method signatures for all the methods inside the FrontEndServer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:23:28+00:00Added an answer on May 11, 2026 at 9:23 am

    If you extend an interface (the same applies if you implement an interface), you can’t override a method and have it throw more checked exceptions than the original. You can it throw the same or less but not more.

    Think about it:

    interface A {   void foo(); }  interface B extends A {   void foo() throws IOException; }  A a = new B() { ... } a.foo(); 

    would potentially throw an IOException but you’d have no way of knowing. That’s why you can’t do it.

    This of course is perfectly acceptable:

    interface A {   void foo() throws IOException; }  interface B extends A {   void foo(); }  A a = new B() { ... } try {     a.foo(); } catch (IOException e) {     // must catch even though B.foo() won't throw one } 

    Your BookNotFoundException could however extend RuntimeException or RemoteException. Not sure that’s a good approach however.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 156k
  • Answers 156k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer No, you don't need to do that (event unbinding is… May 12, 2026 at 10:54 am
  • Editorial Team
    Editorial Team added an answer Considering the implications (especially security concerns), copying to/from clipboard is… May 12, 2026 at 10:54 am
  • Editorial Team
    Editorial Team added an answer Stored-Procedure CREATE PROCEDURE addemp @eno int, @ename varchar(50), @edate datetime… May 12, 2026 at 10:54 am

Related Questions

I have made a directory called middle and inside it another directory called tier
This Paper ( When the CRC and TCP checksum disagree ) suggests that since
As I understand it, once I've set up an RMI communications link between two
In the following code segment: try: raise Bob() except Fred: print blah How is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.