• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock exam questions

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 351
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
amol deshpande
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic