Hi,
please so share your answers/opinions regarding foll questions:
Q. Which of the following are true regarding Stateful Session beans?
a. Stateful Session beans can not have more than one ejbCreate methods
b. Stateful session beans serve only one client at a time
c. Stateful session beans can remember anything from the previous business method call
d. Stateful session bean can interact with any database using
JDBC e. In the ejbPassivate method of a Stateful session bean, we should release any resources a bean may be holding.
Q. Assume an Entity Bean ‘AccountBean’ with Remote Interface ‘Account’, Home Interface ‘AccountHome’ and Primary Key Class ‘AccountPK’. What should the return value of the ejbCreate() signature in AccountBean be ?
a.AccountPK
b.Account
c.void
Q. Following are some statements about Message-driven beans.
1. A message-driven bean does not have a remote or home interface.
2. A message-driven bean can have only one business method.
3. A message-driven bean can send error messages to clients through Exceptions defines in the JMS API only.
4. A message-driven bean can be stateful or stateless.
5. A message-driven bean can find out the security identity of the message producer through deployment descriptor.
Which of the following combination is false?
a. 3, 4 and 5
b. 1, 4 and 5
c. 1, 3 and 4
d. 1, 3 and 5
e. 2, 3 and 5
Q) The transaction setting attribute for a bean is ‘Required’ in the Deployment Descriptor. A client calls this bean without starting its own transaction. Which of the following will occur ?–
a. The bean will start its new transaction and the transaction context will be returned to the client. The client now continues to execute in this Transaction Context.
b. The bean will start its new transaction but the transaction context will end when the beans business method ends its execution.
c. The bean will run without a transaction
d. An Exception will be thrown because the client called the bean without creating it’s own transaction
Q. Which of the following statements about
EJB Deployment Descriptor are false?
a. Deployment Descriptor is used by containers to learn about various bean attributes like transactional characteristics, access control etc.
b. Deployment Descriptors, since they are in XML format are best suited for transporting enterprise beans back and forth between various systems.
c. Relationships between Entity Beans are stored in Deployment Descriptors.
d. EJBQL statements are written in Deployment Descriptors and not in the Entity Bean
Java files.
- prat.