Top 150+ Solved Enterprise Computing With JAVA MCQ Questions Answer
Q. Which EJB usually represents persistent data?
a. Entity Bean
b. Stateless Session Bean
c. Stateful Session Bean
d. Message-Driven Bean
Q. Which is least visibility scope for Java bean in JSP?
a. Page
b. Session
c. Request
d. Application
Q. Which of the following is true for JNDI?
a. Database service
b. Naming and Directory Service
c. Network Service
d. Web Service
Q. Which EJB uses EJB-QL for query operations?
a. BMP Entity Bean
b. CMP Entity Bean
c. Session Bean
d. Message-Driven Bean
Q. Which of the following is true for Java Bean?
a. It can not be a GUI component
b. It never implements serializable interface
c. It has zero-argument constructor
d. It is a distributed component
Q. Which of the following is not an implicit object in JSP?I. Request. II. Session. III. Vector. IV. In.
a. Both (I) and (II) above
b. Both (II) and (III) above
c. Both (I) and (III) above
d. Both (III) and (IV) above.
Q. Which two of the following is responsible to creates ejb-jar files? 1. The bean provider. 2. The application assembler. 3. The deployer. 4. The system administrator.
a. 1 and 2
b. 2 and 3
c. 3 and 4
d. 4 and 1
Q. Which statement about session beans is true?
a. In both stateless and statefull session classes, the bean provider must write the method public void remove()
b. The method << remove >> in the component interface can be accessed only by the remote clients
c. The bean’s handle must be provided by the client, in order to ask the EJBHome for removing a session bean
d. None of the above
Q. Which of the following can be directly invoked by the client?
a. ejbPassivate
b. business methods
c. setSessionContext
d. newInstance
Q. Which is the method available in SessionContext interface?
a. afterBegin()
b. getRollbackOnly()
c. setSessionCotext()
d. getUserTransaction()
Q. Which statements about a session bean class are true?
a. It is a final class
b. Overloaded constructors are supported
c. Their business methods can be 'private'
d. The ejbCreate() method must not be a final method
Q. Upon invoking getRollbackOnly() method by a business method in an entity bean, which transaction attribute settings will lead the ejb container to throw an exception?
a. Required
b. RequiresNew
c. Never
d. Mandatory
Q. EJB system’s performance tuning is the responsibility of
a. Bean Provider
b. EJB Deployer
c. Application Assembler
d. Tool Vendor