I just happen to take my first full fledged mock exam test on http://www.gayanb.com/scbcd_practice_questions.php. 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?
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?
A) JMX B) JSP C) JAXP D) JDO E) JavaMail F) JXTA G) JCE
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.
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.