MCQs > IT & Programming > Enterprise Java Beans - EJB > You are working with EJB2.0. You have to retrieve a previously saved handle to an EJBObject named 'bookEJBObject.' In order to restart the processing for that particular request, you need to get the remote interface. The following code has been written for the same:

1. ObjectInputStream stream =
2.                new ObjectInputStream(new FileInputStream(fileName));
3.
4. Handle bookHandle = (Handle) stream.readObject();
5.
6. BookRemoteInterface bookEjbObject = (BookRemoteInterface) XX() ;

Which of the following should substitute Method XX() of line 6?


Enterprise Java Beans - EJB MCQs

You are working with EJB2.0. You have to retrieve a previously saved handle to an EJBObject named 'bookEJBObject.' In order to restart the processing for that particular request, you need to get the remote interface. The following code has been written for the same:

1. ObjectInputStream stream =
2.                new ObjectInputStream(new FileInputStream(fileName));
3.
4. Handle bookHandle = (Handle) stream.readObject();
5.
6. BookRemoteInterface bookEjbObject = (BookRemoteInterface) XX() ;

Which of the following should substitute Method XX() of line 6?


Answer

Correct Answer: javax.rmi.PortableRemoteObject.narraow(bookHandle.getEJBObject(), BookRemoteInterface.class);

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Enterprise Java Beans - EJB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Enterprise Java Beans - EJB Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it