Multiple choice technology architecture

Which of the following properties of stateful session beans are true:Please select the best answer.

  1. There is a many-to-one relationship between the client and the session bean instance.

  2. Session bean instances live forever.

  3. The container may discard the bean instance arbitrarily, when and if it needs to, for performance reasons.

  4. Stateful session beans may have initial state information passed to them from the client when they are created.

  5. Stateful session bean intances are created when the bean is deployed in the container.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Stateful session beans maintain conversational state with a specific client. The correct answer is D because stateful session beans can receive initial state information through arguments in their create methods. Option A is incorrect because while there's a relationship, it's not accurately described as many-to-one. Option B is false because bean instances have a finite lifecycle. Option C is incorrect because the container doesn't arbitrarily discard stateful beans - passivation/activation follows specific rules. Option E is false because instances are created on client demand, not deployment.