• 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

New Mock Exam questions...

 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy, here are several questions that should help you get ready for the exam. To make them a little more difficult, I am not telling you how many answers are correct, but rest assured that the REAL exam *will* tell you (choose two, etc.)
======================================
1) Which will survive an EJB server crash? (choose all that apply)
A) Stateful session bean instances
B) Stateless session bean instances
C) Message-driven bean instances
D) An entity bean's primary key
E) An entity

2) Which are guaranteed by EJB 2.0?
A) Server crashes will be transparent to entity bean clients.
B) Server crashes will be transparent to stateless session bean clients.
C) You can do synchronous message handling through message-driven beans.
D) You can have both a local and remote client view for stateless session beans.
E) You can have both a local and remote client view for entity beans.
F) You can have both a local and remote client view for message-driven beans.
G) You can have nested transactions in stateful session beans using BMT.
3) Which APIs are provided by the container?
A) JMX
B) JSP
C) JAXP
D) JDO
E) JavaMail
F) JXTA
G) JCE

4) Given this declaration in the DD:
<method-permission>
<role-name>minion</role-name>
....
</method-permission>
assuming the rest of it is filled in correctly, WHO is responsible for supplying this info?
A) App Assembler
B) Deployer
C) Bean Provider
5) 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

6) Which are true about Session bean passivation?
A) Passivation always uses Serialization.
B) A bean can be removed even while in a passivated state.
C) A bean can be passivated even while in a transaction.
D) Both stateless and stateful session beans can be passivated.
E) A UserTransaction reference cannot be passivated.
F) A 'Connection' reference cannot be passivated.
G) A resource manager connection factory reference cannot be passivated.
H) A reference to a bean's privated JNDI environment can be passivated.
I) A null reference can be passivated.
J) Under some circumstances, the bean might be passivated *without* getting an ejbPassivate method call.

7) Which must NOT be invoked on a bean's EJBContext until AFTER the execution of the setSessionContext method in a stateless session bean using CMT?
A) getEJBLocalHome
B) getEJBObject
C) getUserTransaction
D) getCallerPrincipal
E) isCallerInRole
F) setRollbackOnly
G) getRollbackOnly
H) getEJBLocalObject

8) Which are true about entity beans?
A) A client can get the beans primary key by calling a method defined in javax.ejb.EJBObject
B) A local client can remove a bean using either the component or home interface of the bean.
C) A remote client can remove a bean using either the component or home interface of the bean.
D) A local client is guaranteed to find at least ONE create() method in the bean's home interface.
E) A remote client is guaranteed to find at least ONE create() method in the bean's component interface.
F) A local client is guaranteed to have access to the getters and setters of a CMP bean's persistent fields.
=============================
OK, go have fun. Those who immediately know all the answers, please try to pose more questions rather than just giving the answers... for the benefit of those here who are yet to take the exam (or aren't as certain that they indeed passed the beta).
cheers,
Kathy

Are you well-encapsulated? Show the world with your Head First Java boxer shorts.
 
Ranch Hand
Posts: 2378
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kathy for a new bunch of questions. I hope it'll continue...
 
Kathy Sierra
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK test takers, I am going to have to get strong with you on the mock exam questions...
Here's the deal -- *I* will keep posting them, but only IF you try to come up with the answers!!
So, if nobody talks about the questions and posts their answers (and I'll give a little time for other folks to agree or disagree or say why they think that's the answer), then I'm just going to sit here with my little pile of lonely mock exam questions, and I'll show them ONLY to my dog Clover.
(who is hoping for a really good score anyway, but as you can imagine -- she, too, is worried about those Drag and Drop questions. The whole paw thing...)
cheers and good luck,
Kathy "Mistress of the Mock" Sierra
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeh Guys, Questions are of new value without the answers.
Post them to make Cowmistress happy.
 
Kathy Sierra
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Cathy Vierra:
Yeh Guys, Questions are of new value without the answers.
Post them to make Cowmistress happy.


Javaranch has its roots in learning... that's why I started it in the first place
So, you're absolutely right -- the questions alone won't have value unless learners try to work out the answers. But if *I* supply the answers in advance, then there's not nearly as much opportunity for the learning experience. That's why I like to wait... and give answers only after people have worked with them a little while.
And you're also right that it WILL make the cowmistress very happy indeed I love it when everyone's trying to get ready for an exam, and helping each other work out the issues (like by looking in the spec, etc.)
That's why we're here
cheers,
Kathy
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 -D
2-a,d,e
3-c,e,g
 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1 - D
2 - A,D,E
3 - C,G
4 - A
5 - A,E,G
6 - B,C,F,H,I
7 - C,F,G
8 - A,B,C,F

:roll:
 
Rangarajan Suresh
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rangarajan Suresh:
1) Which will survive an EJB server crash? (choose all that apply)
A) Stateful session bean instances
B) Stateless session bean instances
C) Message-driven bean instances
D) An entity bean's primary key
E) An entity


Doesnt the option E look a bit awkward?
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesnt the option E look a bit awkward?
I guess it should be something like:
E. Entity bean instances
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The EJB Provider can rely on the EJB 2.0 Container Provider to provide the following APIs:
JavaMail 1.1 Standard Extension (for sending mail only)
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont understand how can F be answer for 8.
I dont agree at all.

F) A local client is guaranteed to have access to the getters and setters of a CMP bean's persistent fields.


Some one must expose the getter and setter methods in component interface, It doesn't come by default.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't C answer for 5?
C) The object referenced by aHandle is from a class implemented by the container
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
3) Which APIs are provided by the container?
A) JMX
B) JSP
C) JAXP
D) JDO
E) JavaMail
F) JXTA
G) JCE
Answer:
JMX[Java Management Extensions] is not a part of J2EE 1.3, it will be available from J2EE 1.4 onwards.
JSP[Java Server Pages] is a part of J2EE.
JAXP[Java API for XML Processing]is a part of J2EE 1.3.
JXTA is not a part of J2EE
JCE [Java Cryptography Extension] is not a part of J2EE but J2SE.
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Harpreet ,
JSP API is not provided by EJB container.
Here is the list
The EJB Provider can rely on the EJB 2.0 Container Provider to provide the following APIs:
  • Java 2 Platform, Standard Edition, v1.3 (J2SE) APIs
  • EJB 2.0 Standard Extension
  • JDBC 2.0 Standard Extension (support for row sets only)
  • JNDI 1.2 Standard Extension
  • JTA 1.0.1 Standard Extension (the UserTransaction interface only)
  • JMS 1.0.2 Standard Extension
  • JavaMail 1.1 Standard Extension (for sending mail only)
  • JAXP 1.0
  •  
    Greenhorn
    Posts: 19
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by Kathy Sierra:
    Howdy, here are several questions that should help you get ready for the exam. To make them a little more difficult, I am not telling you how many answers are correct, but rest assured that the REAL exam *will* tell you (choose two, etc.)
    ======================================
    1) Which will survive an EJB server crash? (choose all that apply)
    A) Stateful session bean instances
    B) Stateless session bean instances
    C) Message-driven bean instances
    D) An entity bean's primary key
    E) An entity

    2) Which are guaranteed by EJB 2.0?
    A) Server crashes will be transparent to entity bean clients.
    B) Server crashes will be transparent to stateless session bean clients.
    C) You can do synchronous message handling through message-driven beans.
    D) You can have both a local and remote client view for stateless session beans.
    E) You can have both a local and remote client view for entity beans.
    F) You can have both a local and remote client view for message-driven beans.
    G) You can have nested transactions in stateful session beans using BMT.
    3) Which APIs are provided by the container?
    A) JMX
    B) JSP
    C) JAXP
    D) JDO
    E) JavaMail
    F) JXTA
    G) JCE

    4) Given this declaration in the DD:
    <method-permission>
    <role-name>minion</role-name>
    ....
    </method-permission>
    assuming the rest of it is filled in correctly, WHO is responsible for supplying this info?
    A) App Assembler
    B) Deployer
    C) Bean Provider
    5) 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
    Ans A,C,D
    6) Which are true about Session bean passivation?
    A) Passivation always uses Serialization.
    B) A bean can be removed even while in a passivated state.
    C) A bean can be passivated even while in a transaction.
    D) Both stateless and stateful session beans can be passivated.
    E) A UserTransaction reference cannot be passivated.
    F) A 'Connection' reference cannot be passivated.
    G) A resource manager connection factory reference cannot be passivated.
    H) A reference to a bean's privated JNDI environment can be passivated.
    I) A null reference can be passivated.
    J) Under some circumstances, the bean might be passivated *without* getting an ejbPassivate method call.

    7) Which must NOT be invoked on a bean's EJBContext until AFTER the execution of the setSessionContext method in a stateless session bean using CMT?
    A) getEJBLocalHome
    B) getEJBObject
    C) getUserTransaction
    D) getCallerPrincipal
    E) isCallerInRole
    F) setRollbackOnly
    G) getRollbackOnly
    H) getEJBLocalObject

    8) Which are true about entity beans?
    A) A client can get the beans primary key by calling a method defined in javax.ejb.EJBObject
    B) A local client can remove a bean using either the component or home interface of the bean.
    C) A remote client can remove a bean using either the component or home interface of the bean.
    D) A local client is guaranteed to find at least ONE create() method in the bean's home interface.
    E) A remote client is guaranteed to find at least ONE create() method in the bean's component interface.
    F) A local client is guaranteed to have access to the getters and setters of a CMP bean's persistent fields.
    =============================
    OK, go have fun. Those who immediately know all the answers, please try to pose more questions rather than just giving the answers... for the benefit of those here who are yet to take the exam (or aren't as certain that they indeed passed the beta).
    cheers,
    Kathy

    Are you well-encapsulated? Show the world with your Head First Java boxer shorts.

     
    Greenhorn
    Posts: 23
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Kathy !
    Will we win a pdf file with all the mock questions ?
    Thanks,
    William.
     
    Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
    a bit of art, as a gift, the permaculture playing cards
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic