Computer Associates Placement: Sample Questions 5 - 6 of 18

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 5

Appeared in Year: 2004

Question

MCQ▾

What is Temporary Servlet?

Choices

Choice (4)

a.

Servlet that is destroyed at run time

b.

Servlet that is started and stopped for each request

c.

Servlet that exists for a session

d.

Question does not provide sufficient data or is vague

Answer

b.

Explanation

  • A temporary servlet is started when a request arrives and shut down after the response is generated.
  • A permanent servlet is loaded when the server is started and lives until the server is shut down.
  • This is useful when startup costs are high, such as a servlet that establishes a connection to a database.
  • Also useful for permanent serverside service, such as an RMI server.
  • Provides faster response to client requests when this is crucial.

Question 6

Appeared in Year: 2004

Question

MCQ▾

At what stage, the life cycle of a CMP bean can be assumed to be started?

Choices

Choice (4)

a.

Before ejbCreate () method is executed

b.

In postCreate () method

c.

After ejbCreate () method is executed

d.

After executing ejbStore ()

Answer

d.

Explanation

The Life Cycle of a CMP Bean

In shown in figure, after executing ejbStore () , the life cycle of a CMP bean can be assumed to be started

Developed by: