Win a copy of AWS Security this week in the Cloud/Virtualization 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Mock Exam Question

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
Lookout! Runaway whale! Hide behind this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic