BEA Weblogic Question:
Download Questions PDF

Which is the only method defined in the javax.ejb.Handle interface?

Answer:

a. getEJBHome
b. getEJBObject
c. getPrimaryKey
d. getHomeHandle


Choice B is correct. The Handle is a serializable reference to the EJBObject. The EJBObject.getHandle() method returns a Handle object. The Handle allows us to recreate an EJB object remote reference that points to the same type of session bean or the same unique bean that the handle came from.
The Handle interface specifies only one method, getEJBObject(). Calling this method returns the EJB Object from which the handle was created. After getting the object back, we can narrow or cast it to the appropriate remote interface type. The getEJBHome method is defined in the HomeHandle interface and the getPrimaryKey method in the EntityContext interface. The getHomeHandle method is defined in the EJBHome interface.

Download BEA Weblogic Interview Questions And Answers PDF

Previous QuestionNext Question
A stateful session bean implementing the SessionSynchronization interface is deployed on the WebLogic server. Which of the following callback methods may be invoked on the bean?Considering the code below, which of the lines of code (given in the choices) should be placed at line 4 to make this JSP prints My score is : 100? Please ignore the line numbers for the purpose of validity of the JSP code.?