This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock Exam Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Mock Exam Question" Watch "Mock Exam Question" New topic

Mock Exam Question

Alibabra Sanjie
Ranch Hand

Joined: Feb 09, 2004
Posts: 147
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?

Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
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.
Alibabra Sanjie
Ranch Hand

Joined: Feb 09, 2004
Posts: 147
Yes, that's my mistake. "EJBHome" imply that is a remote home interface. So 2 and 3 are the correct answer.
I agree. Here's the link:
subject: Mock Exam Question
Similar Threads
SCEA Exam 1 and EJB 2
doubt : class defined inside an interface
SCBCD :Can a session bean clss implement the session bean's component interface ?
Sierra/Bates SCJP v6 - Interfaces and overridden methods
can anyone explain me this?