Client programs that access EJBs make use of the Java Naming and Directory Interface (JNDI). To get access to a Person entity bean, which methods can be used? (2 correct answers). Assume the following code is used to establish the initial context: Propert

  1. PersonHome ph = ctx.lookup("java:comp/env/ejb/Person");

  2. PersonLocalHome ph=(PersonLocalHome)ctx.lookup("java:comp/env/ejb/PersonLocalHome");

  3. PersonHome ph = ctx.lookup("java:comp/env/ejb/PersonHome");

  4. PersonHome ph = javax.rmi.PortableRemoteObject.narrow(ctx, PersonHome.class)

  5. PersonHome ph = (PersonHome)javax.rmi.PortableRemoteObject.narrow(ctx,PersonHome.class)


Correct Option: B,E

Find more quizzes: