What is best method for obtaining a home interface for a bean named Employee?

What is best method for obtaining a home interface for a bean named Employee?

What is best method for obtaining a home interface for a bean named Employee?

A.
Context initCtx = new InitialContext(System.getProperties());
Object o = initCtx.lookup(“EmployeeHome”);
EmployeeHome empHome = (EmployeeHome)
javax.rmi.PortableRemoteObject.narrow(o,
EmployeeHome.class);

B.
Context initCtx = InitialContext.getDefaultContext();
EmployeeHome empHome = (EmployeeHome)
initCtx.lookup(“EmployeeHome”);

C.
Context initCtx = new InitialContext(System.getProperties());
EmployeeHome empHome = (EmployeeHome)
initCtx.lookup(“EmployeeHome”);

D.
Context initCtx = InitialContext.getDefaultContext();
Object o = initCtx.lookup(“EmployeeHome”);
EmployeeHome empHome = (EmployeeHome)
javax.rmi.PortableRemoteObject.narrow(o,
EmployeeHome.class);



Leave a Reply 0

Your email address will not be published. Required fields are marked *