Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

Doubts in Mock exam questions.

Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I just happen to take my first full fledged mock exam test on
In this site they have specified as "answers posted by Kathy Sierra,Bert Bates and others on the javaranch EJB Certification forum".
I need some clarifications for some of the answers given to the questions.

These are following questions which i need clarification for the answers given.Pls go through these questions and see
the answers given and the answers given by me.If i am wrong can anyone pls correct me.

Can anyone let me know any other good mock exams for SCBCD.

1. Which statements about stateful and stateless session beans are true?
(Choose all that apply.)

a). Only stateful session beans support transactions.
b). Only stateful session beans can be passivated.
c). Only stateful session beans have a 'setSessionContext' method.
d). Both stateful and stateless session beans can support
overloaded 'ejbCreate' methods.
e). Both stateful and stateless session beans can implement
the 'javax.ejb.SessionSynchronization' interface.
f). Both stateful and stateless session beans can have instance variable state.

ans given : b,f - how a stateless session bean can have state in an instance variable.
my answer : b

3. For this drag and drop type question, you can use each element only once.
Which interface should be matched with which fact,
so that all four matches are correct?

1. remote component a. does not have a getHomeHandle() method
2. remote home b. extends 'javax.ejb.EJBObject'
3. local component c. methods must NOT throw 'java.rmi.RemoteException'
4. local home d. can be used to retrieve an EJBObject reference.

ans given :
1 - b
2 - d
3 - a
4 - c

My answer :
1 -b
2 -d
3- c
4 - a

4.Which two are true about bean-managed transaction demarcation?

A) A transaction used by a BMT bean MUST have been started by the bean.
B) The caller's transaction will be propogated into a BMT bean.
C) Transactions in a BMT bean do not propogate when the BMT bean calls
a method on another bean.
D) A bean cannot use both CMT and BMT together.
E) BMT beans must not specify transaction attributes

ans given ,e - pls explain me my optiion a) is not valid
my answer :a,d,e

5. 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

ans given : d
my answer : e

6. Which APIs are provided by the container?

E) JavaMail

ans given : c,g - what is JXTA
my answer : c,e

7. 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.

ANS given : B,C,F,H,I
my answer : a,b,f,h,i
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Option C is definitely not a correct answer

shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like option A is not a correct option

Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here's my analysis on the questions:
Q1 - A statless bean can have instance variable state, just not client specific state. Therefore f) is correct as well as b).

Q3 - You are correct on this question, probably an error in the exam.

Q4 - I've seen this question before, and yes, you're correct. A should be a) should be one of the correct answers.

Q5 - I believe option e) should be correct as well.

Q6 - Again, your answers are correct. JTA is part of the EJB required specifications, but JXTA is not (though many vendors implement it anyway).

Q7 - a) is not correct. We can assume that passivation works LIKE serialization, but it's not mandatory that the container use serialization to passivate beans. c) is incorrect. This is a strict violation of the spec.
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic