On This Page

This set of J2EE Technologies Multiple Choice Questions & Answers (MCQs) focuses on J2Ee Technologies Set 2

Q1 | Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?
  • Transaction support
  • Persistence support
  • Naming support
  • All mentioned above
Q2 | EJB is a specification for J2EE server, not a product; Java beans may be a graphicalcomponent in IDE.
  • TRUE
  • FALSE
  • none
  • all
Q3 | A session bean represents a multiple clients inside the Application Server.
  • TRUE
  • FALSE
  • none
  • all
Q4 | Which component does the Entity bean represent the persistent data stored in thedatabase?
  • Server-side component
  • Client-side component
  • server and client side component
  • None of the above
Q5 | EJB is like COM, Abbreviate the term COM?
  • Component Object Model
  • Component Oriented Model
  • Common Object Model
  • Common Oriented Model
Q6 | JMS is also known as a messaging service.
  • TRUE
  • FALSE
  • none
  • all
Q7 | What represents a persistent global data from the database?
  • Entity Bean
  • Session Bean
  • Both A & B
  • None of the above
Q8 | Which component does the Entity bean represents the persistent data stored in the database?
  • Server-side component
  • Client-side component
  • server and client side component
  • None of the above
Q9 | In EJB, middleware services are provided by EJB Container automatically.
  • TRUE
  • FALSE
  • none
  • all
Q10 | Which middleware services are provided by EJB?
  • Security
  • Transaction Management
  • Both A & B
  • None of the above
Q11 | Which server-side component is required to be deployed on the server?
  • EJB
  • RMI
  • Both A & B
  • None of the above
Q12 | Which type of instances retain no data or conversational state for a specific client?
  • Message-Driven Bean
  • Session Bean
  • Entity Bean
  • None of the above
Q13 | EJB technology is built on the top of Socket Programming
  • TRUE
  • FALSE
  • none
  • all
Q14 | How constructor can be used for a servlet?
  • Initialization
  • Constructor function
  • Initialization and Constructor function
  • Setup() method
Q15 | Can servlet class declare constructor with ServletConfig object as an argument?
  • TRUE
  • FALSE
  • none
  • all
Q16 | Java Servletsare efficient and powerful solution for creating .......................for the web.
  • dynamic content
  • static content
  • hardware
  • both and b
Q17 | ..................... is the first phase of the servlet life cycle.
  • Initialization
  • Service
  • Destruction
  • Both a and b
Q18 | The service phase of the servlet life cycle represents all interactions with requests until the servlet is ......................
  • created
  • running
  • initiated
  • destroyed
Q19 | GET methods are great for sending ....................amounts of information that you do not mind having visible in a URL.
  • negligible
  • huge
  • small
  • both and b
Q20 | Several vendors are adding ...................... to their existing database .................
  • JDOBC, middle-ware products
  • JDBC drivers, upper-ware products
  • middle-ware products, JDOBC drivers
  • JDBC drivers, middle-ware products
Q21 | Which of the following code is used to get an attribute in a HTTP Session object inservlets?
  • session.getAttribute(String name)
  • session.alterAttribute(String name)
  • session.updateAttribute(String name)
  • session.setAttribute(String name)
Q22 | A servlet needs to acquire a data source through a JNDI naming lookup. Which of the following is the best place to do this?
  • Constructor
  • init method
  • service method
  • doGet method
Q23 | What's the difference between servlets and applets? a. Servlets executes on Servers, where as
  • Applets executes on Browser
  • Servlets have no GUI, where as an Applet has GUI
  • Servlets creates static web pages, where as Applets creates dynamic web pages
  • Servlets can handle only a single request, where as Applet can handle multiple requests
Q24 | Which of the following code retrieves the body of the request as binary data?
  • DataInputStream data = new InputStream()
  • DataInputStream data = response.getInputStream()
  • DataInputStream data = request.getInputStream()
  • DataInputStream data = request.fetchInputStream()
Q25 | When destroy() method of a filter is called?
  • The destroy() method is called only once at the end of the life cycle of a filter
  • The destroy() method is called after the filter has executed doFilter method
  • The destroy() method is called only once at the begining of the life cycle of a filter
  • The destroyer() method is called after the filter has executed