Originally posted by yamini nadella:
(1) The statement is true or false:
In a session bean's setSessionContext(SessionContext) method the
component interface of the session bean can be obtained by calling
javax.ejb.SessionContext's getEJBObject() or getEJBLocalObject() method
Answer is FALSE. I think it should be TRUE
ONLY Bean thing you can do in set<Session/Entity>Context(...) method is
Use your <Session/Entity>Context -> to get a reference to your home
(HFEJB page 196)
So answer should be FALSE.
Originally posted by yamini nadella:
[QB(2) The statement is true or false: Transaction attributes are specified at the ejb-jar file level i.e., they are applicable to all the enterprise beans in the same ejb-jar file
Answer - FALSE . why?
[/QB]
Transaction attributes are described on per method basis. See following DD example
So you describe
both ejb name and method name and trans-attributes are described on per method basis.
Hence the answer should be FALSE
Originally posted by yamini nadella:
[QB(3) A message-driven bean instance can not concurrently serve multiple clients.
if this is true then session / entity beans can serve clients concurrently?
[/QB]
A single
Stateless session bean can handle multiple clients as long as only one client at a time is in the middle of a method. (HFEJB Page 103)
But clients never share the bean.
Entity beans, client share the home and may share the bean (HFJEB page 99)