Java Stream Question and Answers

5. Which application server have you used for EJB?
  JBOSS as the application server to host EJB components.
 
Your Name Your Email-ID
Your Answer
6. Can you explain the concept of local interfaces?
 
  • JAVA client calls the local stub.
  • Stub Marshal's the values in to some other form which the network understands and sends it to the skeleton.
  • Skeleton then de-marshals it back to a form which is suitable for JAVA.
  • EJB object then does object creation, connection pooling, transaction etc.
  • Once EJB object calls the bean and the bean completes its functionalities.
  • So you can easily guess from the above step that its lot of work. But this has been improved in EJB 2.0 using Local objects.
  • Local objects implement local interface rather than using remote interface. Just to have a comparison below are the steps how the local object works.
  • JAVA client calls the local object.
  • Local object does connection pooling, transactions and security.
  • It then passes calls the beans and when bean completes its work it returns the data to the Local object who then passes the same to the end client.
 
Your Name Your Email-ID
Your Answer
7. How does the server decide which beans to passivate and activate?
  Most servers use the (LRU) Last Recently Used Time as a strategy. Which mean passivate the beans which have been called recently.
 
Your Name Your Email-ID
Your Answer
8. What are the limitations of using local object?
 
  • Local object only work if you are calling beans in the same process. Second they marshal data by ref rather than by val.
  • This may speed up your performance but you need to change semantics for the same.
  • So finally it's a design and the requirements decision. If you are expecting to call beans remotely then using local object will not work.
 
Your Name Your Email-ID
Your Answer
12345678910 Page 2 of 10