Hello , I am quite new to EJB. I have found interview questions posted here in forum but could not find answers for following questions. If someone know, please help me. Thanks in advance. 1) How many tables can be attached to entity Bean? 2) Why field variables are declared public in entity bean? 3) Which class is implemented in primary key class? 4) How does stateful entity bean stores it's state? 5) Why does stateless session bean does not store its state even though it has ejbActivate and ejbPassivate methods ? 6) If my browser do not support cookie and cookie is sent by the server, what will happen? 7) Can we use user defined threads in EJB? if no then why?
Hello Rajesh, You should buy one good EJB book. I one I like best is Richard Monson-Haefel's book "Enterprise JavaBeans", now in its 3rd edition. There are others, of course. See if you can get a used copy, or borrow one from somebody if you can't afford to buy it right away. Regards,
Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
3) Which class is implemented in primary key class? This actually is an interface and the answer is serializable. 4) How does stateful entity bean stores it's state? It stores them in its instance variables 5) Why does stateless session bean does not store its state even though it has ejbActivate and ejbPassivate methods ? These callbacks are never made by the container for stateless session beans. 6) If my browser do not support cookie and cookie is sent by the server, what will happen? The session cannot be tracked. You should use URLencoding for this. 7) Can we use user defined threads in EJB? if no then why? NO. The specs recommend against doing so, because thread management is intended to be an EJB-container feature. -Sri
Originally posted by Sri Basavanahally: 4) How does stateful Session bean stores it's state? It stores them in its instance variables
Sri, Doesnt the container use ejbPassivate() and ejbActivate() and write them out to the disk? I tried to research on your answer, but couldn't find it anywhere. Can you give some reference where you found this, so that I could read about it? PK [ October 31, 2003: Message edited by: Prakash Krishnamurthy ]