Tim Holloway wrote:I don't understand. Regardless of whether a session bean is JSF-managed or managed via regular J2EE code, what are you trying to do?
It sounds like you're removing the bean from the session, modifying it, then returning it to the session. What's the point in removing/adding, when you can just leave the bean in the session and modify it in place?
Fully agree. Just get the reference and alter it. Do you know how collections/maps work? I would go through a decent
Java book/tutorial which covers collections/maps. This is fairly trivial.
Back to your actual question: depends on the functional requirement, but in this case I think I would have used managed property injection.