Scripts- Server Side-JSP [Computer Associates Placement]: Sample Questions 9 - 9 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 9

Appeared in Year: 2004



How multiple EJB instances are managed?


Choice (4)


Connection Pooling


Caching of EJB instances


EJB Passivation


All a., b. and c. are correct




  • Connection Polling:
    • Server maintains a free pool of ready-to-use EJB instances for stateless session beans, message-driven beans and entity beans.
    • The EJB container creates a configurable number of bean instances at startup, so that a new instance does not have to be created for every request.
    • When a client is done with an EJB instance, the container returns it to the pool for reuse
  • Caching of EJB instances:
    • Weblogic Server supports caching for stateful session beans and entity beans.
    • An inactive cached bean instance can be passivated — removed from the cache and written to disk — and restored to memory later as necessary. Passivating bean instances optimizes use of system resources.
    • You can configure the size of the cache, and related behaviors such as rules for removing beans from the cache.
    • Caching is supported for entity EJBs, whether they use container-managed or bean-managed persistence.
  • EJB Passivation
    • Passivation is the process of disassociating a bean instance from its EJB object so that the instance can be reused or evicted to conserve memory.
    • Calling of ejbPassivate () for passivation is a warning to the bean that its held conversational state is about to be swapped out.
    • It is important that the container inform the bean using ejbPassivate () so that the bean can relinquish held resources.

Developed by: