Java Enterprise Web Technologies

Covers EJB transaction management and Servlet APIs for Java web development

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which transaction means that if the client has a transaction in progress when it invokes the beans methods, the clients transaction is used?

  1. TX_SUPPORTS
  2. TX_BEAN_MANAGED
  3. TX_MANDATORY
  4. Enterprise bean provider
  5. EJB server
Question 2 Multiple Choice (Single Answer)

Which method returns the name of the Servlet's initialization attributes as an enumeration of String objects?

  1. getInitParameter(String name)
  2. getInitParameterNames()
  3. addHeader(java.lang.String name, java.lang.String value)
  4. contains header(java.lang.String name)
  5. setHeader(java.lang.String name, java.lang.String value)
Question 3 Multiple Choice (Single Answer)

Which of the following returns the value of the specified request header as a long value that represents a Date object?

  1. addDateHeader(java.lang.String name, long date)
  2. setDateHeader(java.lang.String name, long date)
  3. getDateHeader(java.lang.String name)
  4. getHeaderName()
  5. getHeader(java.lang.String name)
Question 4 Multiple Choice (Single Answer)

Which method of servlet is invoked once per a request and is responsible for generating the response to that request?

  1. service()
  2. init()
  3. destroy()
  4. GET
  5. POST
Question 5 Multiple Choice (Single Answer)

In which of the following does the container temporary suspends a transaction, until the bean's transaction finishes, if it is under way?

  1. TX_REQUIRED
  2. TX_REQUIRES_NEW
  3. TX_BEAN_MANAGED
  4. Instance passivation
  5. Application assembler