Top 150+ Solved Enterprise Computing With JAVA MCQ Questions Answer
Q. In JSP Action tags which tags are used for bean development?
a. jsp:useBean
b. jsp:setPoperty
c. jsp:getProperty
d. All mentioned above
Q. Which two interfaces does the javax.servlet.jsp package have?
a. JspPage
b. HttpJspPage
c. PageContext
d. Both A & B
Q. Which of the following is an advantage of the statement – Separation of business logic from JSP?
a. Custom Tags in JSP
b. JSP Standard Tag Library
c. All the above
d. None of the above
Q. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you cando with Java servlets.
a. True
b. False
c. none
d. all
Q. JavaServer Pages often serve the same purpose as programs implemented using the Common Gateway Interface (CGI)
a. True
b. False
c. none
d. all
Q. Which action tags are used in JSP for developing web application with Java Bean?
a. jsp:useBean
b. jsp:setProperty
c. jsp:getProperty
d. Both B & C
Q. Which statement correctly identifies the goals of the designers of the EJB architecture?
a. The EJB architecture requires that users be aware of the low-level transaction details of the Java EE platform.
b. The EJB architecture is the standard component architecture for building distributed business applications in the Java programming language. (*)
c. Although the EJB architecture defines the contracts that enable tools to develop and deploy components, each application server vendor must produce its own set of additional tooling.
d. The EJB architecture provides a standard way of persisting state data using the Java Persistence API, Java Data Objects, and JDBC.
Q. Which statement about life-cycle callback methods is correct?
a. Life-cycle callback methods must be implemented in the bean class.
b. Life-cycle callback methods can have public, private, protected, or packagelevel access. (*)
c. A life-cycle callback method can only have a single callback annotation. In other words, you cannot define a single method and give it two different callback annotations.
d. Life-cycle callback methods can be declared as static.
Q. Which of the following types of Enterprise Java Bean will be most likely to be difficult to port from one App Server to another?
a. Stateful Session Beans
b. Stateless Session Bean
c. BMP (Bean Managed Persistence) Entity Bean
d. CMP (Container Managed Persistence) Entity Bean
Q. Which interface should be implemented by a stateful session bean if it needs to synchronize its conversational state with the transactional context?
a. javax.transaction.UserTransaction
b. javax.ejb.SessionSynchronization
c. javax.ejb.EJBContext
d. javax.transaction.TransactionContext
Q. Which of the following exceptions is thrown by the ejbLoad() method of an entity bean when the database row to be loaded is not found ?
a. NoSuchEntityException
b. EJBException
c. RemoteException
d. ObjectNotFoundException
Q. Which of the following is the format for EJB deployment descriptor files?
a. XML
b. XSL
c. HTML
d. Java
Q. EJB is a
a. Middleware
b. Scalable component architecture
c. Component architecture to integrate legacy systems
d. All of the above.
Q. Which of the following EJB has no state?i. Message-Driven Bean. ii. BMP Entity Bean. iii. Stateless Session Bean. iv. Stateful Session Bean.
a. Both (I) and (II) above
b. Both (II) and (III) above
c. Both (III) and (IV) above
d. Both (I) and (III) above.