| Author |
Mock question
|
Sudhir V
Ranch Hand
Joined: Dec 25, 2002
Posts: 143
|
|
1) 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 2) 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. I think the answers shud be 1) A, C, E, G. 2) B, F, H, I [ February 22, 2004: Message edited by: Sudhir Vallam ]
|
Sudhir V<br />(SCJP 1.2, SCWCD, OCA, SCBCD)
|
 |
Prasad Kuppa
Ranch Hand
Joined: Apr 01, 2002
Posts: 151
|
|
I think the answer : G) The object referenced by 'a' IS-A java.rmi.Remote for question 1 is incorrect. because Handle is not a Remote. ( it does not extend java.rmi.Remote). Prasad
|
 |
Sudhir V
Ranch Hand
Joined: Dec 25, 2002
Posts: 143
|
|
|
But does'nt 'a' refer to the remote component interface which indirectly extends java.rmi.remote from javax.ejb.EJBObject
|
 |
Roger Chung-Wee
Ranch Hand
Joined: Sep 29, 2002
Posts: 1683
|
|
|
Initially, I thought that 1 (B) was right, but then I remembered that the Home interface must extend either EJBHome or EJBLocalHome.
|
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
|
 |
 |
|
|
subject: Mock question
|
|
|