File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock exam questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Mock exam questions" Watch "Mock exam questions" New topic
Author

Mock exam questions

amol deshpande
Ranch Hand

Joined: Sep 05, 2003
Posts: 162
Hi consider a mock exam question!!!
1)
Given this code:
try {
Advice a = aHome.create();
Handle aHandle = a.getHandle();
} catch (Exception ex) {...}

which are true? (assume everything compiles and works correctly)

A) aHandle must be Serializable.
B) Advice must extend EJBHome
C) The object referenced by aHandle is from a class implemented by
the container
D) The Bean Provider implemented the aHome.create() method.
E) getHandle() declares a RemoteException
F) Handle extends java.rmi.Remote
G) The object referenced by 'a' IS-A java.rmi.Remote

MY ANSACEG
SOLN ANSAEG

Can u clarify? Doesnt the container implement Handle ? (Handle is interface, so who creates a class that implements Handle?)

2)
T or F
The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.

???
Amol.
Leena Diwan
Ranch Hand

Joined: Jun 18, 2001
Posts: 351
Originally posted by amol deshpande:
Can u clarify? Doesnt the container implement Handle ? (Handle is interface, so who creates a class that implements Handle?)

The deployment tools are responsible for this.

Page 201 of spec:
The deployment tools are responsible for implementing the handle class for the entity bean.

Page 101 of spec:
The deployment tools are responsible for implementing the handle classes for the session bean�s remote home and remote interfaces.


Originally posted by amol deshpande:

2)
T or F
The deployer sets and modifies the values of the environment entries by editing the enterprise bean's deployment descriptor.

Depends on the context. No one can change the env-entry values "at runtime".


Page 410 of spec says : The Deployer uses the tools provided by the Container to create the environment entries that are declared in the enterprise bean�s deployment descriptor. The Deployer can set and modify the values of the environment entries.

And page 415 says: Provide a deployment tool that allows the Deployer to set and modify the values of the enterprise bean�s environment entries.


The question might be "derived" from this. But I do not see anything wrong with the deployer changing the DD directly, without using the deployment tools. Just that he cannot do it at runtime.

Regards,
Leena


[SCJP2, SCWCD1.3, SCBCD]
amol deshpande
Ranch Hand

Joined: Sep 05, 2003
Posts: 162
Hi there Leena,


1) Since deployment tools are provided by container, wouldn't it be ideal to have that option selected?

2) As spec says that if App Assembler doesnt set the values of Env Entries, deployer sets them and can modify.
I think rather than targeting 'Using Deployment Tools or directly' , option is targetting if Deployer can set/modify them....which again I think is...Yeah...what do u think???
(This questions are from ejbcertificate.com, i found way too many inconsistancies in ques. there.)
Amol.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock exam questions