This week's book giveaway is in the Cloud/Virtualization forum. We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line! See this thread for details.
More fodder, with new and enhanced disclaimers: Disclaimers: You WON'T get any questions on the real exam that say 'choose all that apply' - you will always know exactly how many answers are correct. I use 'choose all that apply' to make these questions harder, you know, to toughen you up a bit When I say 'choose all that apply', there will ALWAYS be at least one correct answer. The real exam uses several forms of 'drag and drop' which I'm kind of pseudo-emulating here; read the questions carefully, for instance some are one-to-many, some are not! Finally, remember the real exam is NOT open-book End of disclaimers, and on to the questions:
1. Which are directly invoked by the client? (Choose all that apply.) a). ejbPassivate b). business methods c). setSessionContext d). newInstance e). create
2. Which is true about passivation for stateful session beans? (Choose all that apply.) a). The container can passivate a stateful session bean regardless of the bean's state. b). The client can passivate a session bean. c). References to JNDI contexts are lost during passivation. d). References to 'SessionContext' are preserved during passivation. e). A passivated, stateful session bean instance will always be re-activated prior to removal.
3. (Note: The real exam has several types of 'drag and drop' questions, that I'm going to do a lame job of simulating with this question...) Match the methods on the left with the interfaces in which those methods can be found, on the right. A match is correct if the method is either declared in, or inherited by, the interface. Note: There may be some many-to-one and one-to-many relationships in your answer.
4. 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.
5. Which statements about a session bean class are true? (Choose all that apply.) a). They can be marked 'final' b). They can support overloaded constructors. c). Their business methods can be 'private'. d). Their business method names must start with "ejb". e). Their 'ejbCreate' methods must not be declared as 'final'.
6. 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?
Have Fun ! -Bert [ May 30, 2003: Message edited by: Bert Bates ]
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Hi, I don't seem to agree with the answer for question 4. Shouldn't it be b,f. A statless Session Bean can have instance variable state - albeit just across the single method call. There is nothing in the spec that says otherwise. I know it dosen't make much sense to have instance vraiables in Statless session beans, but technically that is possible. Anyone agree with me ?
6. 1) remote component----->b. extends 'javax.ejb.EJBObject' 2) remote home--->d.can be used to retrieve an EJBObject reference. 3) local component--->c. methods must NOT throw 'java.rmi.RemoteException' 4) local home--------->a. does not have a getHomeHandle() method
-----------------------------------<br />Never argue with idiots. They drag you down to their level and then beat you with experience !!
Straws are for suckers. Now suck on this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop