Hi,
Following is the question from javabeat
1:Which of the following statements are true about Session Beans?
a. The method designated with @PreDestroy won't be called by the Container when a
business method throws a System Exception.
b. The life-cycle method PostConstruct, PreDestroy, PostActivation and PrePassivation
are called only once for a Stateful Session Bean.
c. A Stateless Session Bean won't participate in Activation and Passivation Mechanism.
d. A Stateful Session Bean may participate in Activation and Passivation Mechanism.
e. All the above.
The
Java Beat Ans is : e
Is it true that the passivation and activation occurs only one time during the life of a sateful sessionbean?
2:Imagine that you have a business interface by name 'Template'. Which of the
following ways can be used by the Client Application to acquire a reference to the
business interface (assuming that this interface is bound in the JNDI Context)?
a. @Resource
SessionContext context;
�
Template template = (Template)context.lookup("template");
b. @EJB
Template template;
c. Template template = null;
InitialContext context = new InitialContext();
template = (Template)Context.lookup("java:comp/ejb/template");
d. All the above.
TheJavabeat Ans
My Answer: b&c
3:Which of the following statements are true about Local and Remote client
views?
a. The arguments specified by a Remote client to an enterprise bean are passed
through reference.
b. For an enterprise Bean, a local client cannot be a Java
Servlet.
c. A Remote Client can run in the same JVM as that of an
EJB Container or in a
different JVM.
d. All the above.
The JavaBeat Ans: a,c
My Ans: c
Please tell me if I am wrong.