aspose file tools*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes New Mock Exam questions... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "New Mock Exam questions..." Watch "New Mock Exam questions..." New topic
Author

New Mock Exam questions...

Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
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.
Ashik Uzzaman
Ranch Hand

Joined: Jul 05, 2001
Posts: 2370

Thanks Kathy for a new bunch of questions. I hope it'll continue...


Ashik Uzzaman
Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
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
Cathy Vierra
Greenhorn

Joined: Aug 21, 2003
Posts: 2
Yeh Guys, Questions are of new value without the answers.
Post them to make Cowmistress happy.
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
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
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

1 -D
2-a,d,e
3-c,e,g


Groovy
Rangarajan Suresh
Ranch Hand

Joined: Jan 08, 2002
Posts: 50
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

Joined: Jan 08, 2002
Posts: 50
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?
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Doesnt the option E look a bit awkward?
I guess it should be something like:
E. Entity bean instances


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

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

Joined: Feb 27, 2002
Posts: 8898

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

Joined: Feb 27, 2002
Posts: 8898

Isn't C answer for 5?
C) The object referenced by aHandle is from a class implemented by the container
Harpreet Hira
Ranch Hand

Joined: Sep 27, 2001
Posts: 72
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

Joined: Feb 27, 2002
Posts: 8898

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
  • Basu DN
    Greenhorn

    Joined: Aug 22, 2003
    Posts: 19
    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.


    Sun Certified Enterprise Architect For J2EE<br />Sun Certified Business Component Developer for J2EE 1.3<br />Sun Certified Web Component Developer for the J2EE Platform<br />Sun Certified Programmer for the Java 2 Platform 1.4<br />IBM WebSphere Application Server, Advanced Single Server Edition for Multiplatforms, V4.0
    William Silva
    Greenhorn

    Joined: Jul 24, 2003
    Posts: 23
    Hi Kathy !
    Will we win a pdf file with all the mock questions ?
    Thanks,
    William.


    -----------------------<br />William W Silva<br />SCJP<br />SCWCD<br />SCBCD
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: New Mock Exam questions...
     
    Similar Threads
    Mock question
    mock questions
    doubt in stateful session bean passivation
    Doubts in Mock exam questions.
    SCBCD Exam Study Material Collection