• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock question

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But does'nt 'a' refer to the remote component interface which indirectly extends java.rmi.remote from javax.ejb.EJBObject
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Initially, I thought that 1 (B) was right, but then I remembered that the Home interface must extend either EJBHome or EJBLocalHome.
reply
    Bookmark Topic Watch Topic
  • New Topic