Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Mock Exam Question

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Code:
4. public interface PartyHome extends javax.ejb.EJBHome {
5. public Party create(String firstName) throws ...
6. }
Which of the following Exceptions must be included in the throws clause of every create<METHOD> in the following code fragment? [Check all correct answers]

1. javax.ejb.FinderException.
2. javax.ejb.CreateException.
3. java.rmi.RemoteException.
4. java.rmi.NoSuchObjectException.
5. javax.ejb.NoSuchObjectLocalException.

The answer from the mock exam is 2 and 3
But I have problem with the 3. 3 should not be the answer because the question has the key word "must", but if I define a local home interface, I don't have to throws RemoteException.
Any comments?
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The wording can stand as-is because the scenario you define (a local home) would be apparent from the code segment provided. I'll leave it to you to discover what would be different in the code for a local interface.
--Dale--
 
Alibabra Sanjie
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that's my mistake. "EJBHome" imply that is a remote home interface. So 2 and 3 are the correct answer.
 
Goodbye moon men. Hello tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic