Java EJB Programming Question:
Download Job Interview Questions and Answers PDF
What happens if remove( ) is never invoked on a session bean?
Answer:
In case of a stateless session bean it may not matter if we call or not as in both cases nothing is done. The number of beans in cache is managed by the container.
In case of stateful session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool.
In case of stateful session bean, the bean may be kept in cache till either the session times out, in which case the bean is removed or when there is a requirement for memory in which case the data is cached and the bean is sent to free pool.
Download Java EJB Programming Interview Questions And Answers
PDF
Previous Question | Next Question |
What are the special design care that must be taken when you work with local interfaces? | What is the difference between Message Driven Beans and Stateless Session beans? |